first pass at implementing Grok.compile