clara

http://www.clara-rules.org/
bartuka 2020-01-13T11:40:39.145500Z

hi, you guys have customized cider to understand rules indentation correctly?

2020-01-13T13:33:15.146Z

I don’t, I think some others may have experimented with it as well as an attempt to format/highlight in Cursive. I’ve personally just used newlines for new conditions and Cider indents that well enough that it hasn’t bothered me.

2020-01-13T13:33:25.146200Z

Is there something in particular that looks strange to you?

bartuka 2020-01-13T22:21:48.146400Z

the default indentation looks like this:

bartuka 2020-01-13T22:21:53.146600Z

(defrule rule->legacy-contract?
  "Add a Legacy fact into the session if the contract was sent with this status."
  [?contract <- Contract [ct] (= ?principal-external-id (:contract/principal-external-id ct))
   (= :legacy (:contract/status ct))]
  =>
  (insert! (->Legacy ?principal-external-id)))

bartuka 2020-01-13T22:22:25.146800Z

and I have to manually change it to:

(defrule rule->legacy-contract?
  "Add a Legacy fact into the session if the contract was sent with this status."
  [?contract <- Contract [ct] (= ?principal-external-id (:contract/principal-external-id ct))
                              (= :legacy (:contract/status ct))]
  =>
  (insert! (->Legacy ?principal-external-id)))

bartuka 2020-01-13T23:34:31.147200Z

sometimes I need to use M-x align-regexp (= to align the conditions