Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Haxe3 minor fix. #4

Merged
merged 1 commit into from

2 participants

@deltaluca

No description provided.

@sledorze sledorze merged commit 5e023a1 into sledorze:master
@sledorze
Owner

Will release a new version of Monax soon.

@deltaluca

Thanks :)

@sledorze
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 30, 2012
  1. Change CType to #if haxe3 CIdent #else CType #end

    Luca Deltodesco authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/com/mindrocks/monads/Monad.hx
View
6 src/com/mindrocks/monads/Monad.hx
@@ -82,7 +82,7 @@ class Monad {
var monadName = (Std.string(monadType)).split("#")[1].split(",")[0]; // not very
- return mk(ECall(mk(EField(mk(EConst(CType(monadName))), "dO")), [exp]));
+ return mk(ECall(mk(EField(mk(EConst(#if haxe3 CIdent #else CType #end(monadName))), "dO")), [exp]));
}
default:
}
@@ -101,7 +101,7 @@ class Monad {
optimize = genOptimize;
- var monadRef = EConst(CType(monadTypeName));
+ var monadRef = EConst(#if haxe3 CIdent #else CType #end(monadTypeName));
var position : Position = context.currentPos();
function mk(e : ExprDef) return { pos : position, expr : e };
@@ -131,7 +131,7 @@ class Monad {
case EReturn(exp) :
switch(exp.expr) {
case EBlock(arr):
- return MCall("ret", [mk(ECall(mk(EField(mk(EConst(CType("Monad"))), "dO")), [exp]))]);
+ return MCall("ret", [mk(ECall(mk(EField(mk(EConst(#if haxe3 CIdent #else CType #end("Monad"))), "dO")), [exp]))]);
default:
return MCall("ret", [exp]);
}
Something went wrong with that request. Please try again.