gsdlab / clafer

Clafer is a lightweight modeling language
http://clafer.org
MIT License
45 stars 13 forks source link

Redefinition #38

Closed Luke-Michael-Brown closed 11 years ago

Luke-Michael-Brown commented 11 years ago

Changed the Ir to allow a clafer to have an ISuper and IReference ('->' and ':') see: http://gsd.uwaterloo.ca:8888/question/1065/separate-the-super-clafer-and-reference-type

Removed ambiguity of '->' and '->>' see: http://gsd.uwaterloo.ca:8888/question/877/expand-set-reference-to-bag-reference-only-in

Added redefinition to clafer

Added Ir parents updating them selves during analysis.

JLiangWaterloo commented 11 years ago

Some quick tips.

  1. "== []" can be replaced with the function "null"

For example "(==[]) . foldMapIR isEmptyCard . snd" can be replaced with "null . foldMapIR isEmptyCard . snd"

  1. Likewise "== Nothing" can be replacede with "isNothing"
  2. "compare on snd" can be replaced with "comparing snd". Both are in the standard library, not sure which is prefered.
  3. I see you use this pattern half a dozen times: "let x = t u v in x" but this is much easier to read as "t u v"

Thanks for all the hard work Luke and good luck with school!