I'm trying to do something like this:
    
    
    template declareEnum*(enumName: untyped, values: untyped) =
      type enumName = enum
        values
    
    declareEnum(Foo):
      Alpha = 0
      Bravo = 1
    
    let val: Foo = Alpha
    
    
    Run

and the compiler gives me an `Illformed AST` on the line with "Alpha" in it. I 
take it the two lines with "Alpha" and "Bravo" are not statements? Is there any 
way to do this with templates?

Reply via email to