-
Notifications
You must be signed in to change notification settings - Fork 65
`pollen/mode' changes indentation in whole document #124
Comments
I see your point. But I also think this notation is slightly mischievous: #lang pollen/mode racket
(define foo
`{(a)
(b)}) Because in #lang pollen/mode racket
(define foo
`{(a)
(b)})
(define foo-paren
`((a)
(b))) Moreover, #lang at-exp racket
(define foo
`{(a)
(b)})
(define foo-paren
`((a)
(b))) So, I grant your point that it would be nice for DrRacket to handle this better. But if the folks who wrote |
As far as I understand, the meaning of #lang pollen/mode racket
'{same-as-parentheses} ;; => '(same-as-parentheses)
◊values{Not the same as parentheses} ;; => "Not the same as parentheses" So, DrRacket could indent the two differently as I proposed, it seems to me. But I agree that it is a bit awkward, so I'm closing the issue. To give a bit of background of how I ended up opening this issue: I'm using I guess my solution is going to be: extract one of these parts—or maybe both—to separate files, which I If you have a better idea, please let me know. |
Yes, that’s what I was getting at (though you have phrased it more precisely). If I had to guess, I think you’ve found an edge case that the #lang pollen/mode racket
(define foo
`{(a)
(b)})
(define foo-paren
`((a)
(b)))
(define foo-bracket
`[(a)
(b)]) Fixing it would require deeper knowledge of the |
PS. I won’t call it “better”, but you can use one or more Pollen source files strictly as a store of values, and |
Indeed, but I am creating an embedded DSL to define the HTML components and, in my language,
I will. Thank you. UPDATE: I opened the issue racket/scribble#54.
That is a good idea. Maybe I'll do that. Thank you very much for your time. |
CURRENT BEHAVIOR
The indentation for
#lang racket
is the following:#lang racket (define foo `{(a) (b)})
Adding
pollen/mode
makes◊
available in Racket code, and is correctly indented according to◊
-indentation rules:The addition of
pollen/mode
changes the indentation of existing code:#lang pollen/mode racket (define foo `{(a) (b)})
EXPECTED BEHAVIOR
Adding
pollen/mode
does not change the indentation of non-◊
code.#lang pollen/mode racket ◊bar{a b} (define foo `{(a) (b)})
Do you think this makes sense? If so, how can I help turning this idea into code?
As always, thank you for Pollen!
The text was updated successfully, but these errors were encountered: