implicit.ly

Scala software, hot off the presses

treehugger 0.1.3

bug fixes and minor enhancements

  • Fixes when TYPE_TUPLE(type) is called with one element. #14 reported by @psnively
  • Adds TYPE_EITHER(typ1, typ2), TYPE_LEFT(typ1, typ2), TYPE_RIGHT(typ1, typ2).
  • Adds RIGHT(tree) and LEFT(tree).

treehugger.scala is a library to code Scala programmatically.

via herald

Filed under  //   treehugger  

treehugger 0.1.2

Self type annotations

Adds withSelf(...) to define self type annotations:

CLASSDEF("C") withSelf("self", "T1", "T2") := BLOCK(
  VAL("x") := REF("self")
)

Type expressions

Adds TYPE_WITH(typ, ...) to define refined types.

VAL("x", TYPE_REF("A") TYPE_WITH "B")

Adds TYPE_SINGLETON(tree) to define singleton types.

VAL("x", TYPE_SINGLETON(THIS))

Bug fixes and minor enhancements

  • Fixes symbol and type name printing. #8
  • Adds withParents(...) to OBJECTDEF(...) and CASEOBJECTDEF(...). #10
  • Fixes TYPE_MAP to generate Map instead of scala.collection.Map.

treehugger.scala is a library to code Scala programmatically.

Filed under  //   Scala 2.8.1   Scala 2.9.1   com.eed3si9n   treehugger  

treehugger 0.1.1

Function type contructors

Several ways were added to create function types.

typ1 TYPE_=> typ2
TYPE_FUNCTION(typ, ..., r)
TYPE_FUNCTION(typ :: Nil, r)

Now accepting Iterables

DSL was expanded to accept Iterable[A] where it accepted vararg of A. Also implicit conversions were expanded to handle iterables. These changes should minimize explicit conversions that were necessary in the previous version:

withTypeParams(sym.pipeParams map {TYPEVAR(_)})

Bug fixes and minor enhancements

  • Fixes param modifiers not printing. #1
  • Fixes passing args to parent constructors. #2
  • Adds withParams(...) to DEF(sym). #3

treehugger.scala is a library to code Scala programmatically.

Filed under  //   Scala 2.8.1   Scala 2.9.1   com.eed3si9n   treehugger  

treehugger 0.1.0

This is the initial release of treehugger.scala.

It's a library for generating Scala code by constructing Scala abstract syntax tree.

treehugger.scala is a library to code Scala programmatically.

Filed under  //   Scala 2.8.1   Scala 2.9.1   com.eed3si9n   treehugger