[Question] Not indenting properly
I am trying to indent Chez code like:
(module (md-handle-jump) ; also sets primitive handlers
(import asm-module)
(define mem?
(lambda (x) #t))
(define md-handle-jump
(lambda (t)
(with-output-language
(L15d Tail)
(define long-form
(lambda (e)
(let ([tmp (make-tmp 'utmp)])
(values
(in-context Effect `(set! ,(make-live-info) ,tmp ,e))
`(jump ,tmp)))))
(nanopass-case (L15c Triv) t
[,lvalue (values '() `(jump ,lvalue))]
[(literal ,info) (values '() `(jump (literal ,info)))]
[(label-ref ,l ,offset) (values '() `(jump (label-ref ,l ,offset)))]
[else (long-form t)])))))
As you can see this is not working great. Mostly I think the problem is that the (import
should come under the o
from (module
and all the other sexp should follow. Also, in the nanopass-case
, it should be:
(nanopass-case (L15c Triv) t
[,lvalue ...
I know Geiser cannot support all possible cases but is there a way to tell geiser how to indent specific constructs?
Edited by Paulo Matos