Permalink
Browse files

Merge pull request #4 from deltaluca/master

Haxe3 minor fix.
  • Loading branch information...
2 parents 6014100 + 3040373 commit 5e023a103978b93a6a0dcfd03b751653d0c1568d @sledorze committed Nov 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 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]);
}

0 comments on commit 5e023a1

Please sign in to comment.