effekt-lang / effekt

A research language with effect handlers and lightweight effect polymorphism

Home Page:https://effekt-lang.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

record logging/stringify could use nice formatting

IR0NSIGHT opened this issue · comments

since Effekt has no stepper, i have to rely on printline logging to debug.
Recently i had a Record Planet(x: double,y: double,z: double,vx: double, vy: double, vz: double, mass: double)
which was hell to read in the output.

  • include field name in show(myRecord): //returns MyRecordType(a: 1, b: 'hello world')
  • use linebreaks after each field
  • format records inside arrays too (currently just outputs [Object object, Object object])

i can not think of a case where linebreaks would be truly problematic, but they would improve readability in the console a LOT
=> streamlining the debugging process