Closed julialongtin closed 3 years ago
we still have 300+ stan warnings. it'll be weeks for me to chase these all out. :)
also, this is my weekend. i have time to respond, am not nearly as on fire as during the week. :)
nope, it doesn't like that.
┃~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
┃
┃ ✦ ID: OBS-STAN-0213-RzskQu-148:77
┃ ✦ Severity: Warning
┃ ✦ Inspection ID: STAN-0213
┃ ✦ Name: Anti-pattern: Pattern matching on '_'
┃ ✦ Description: Pattern matching on '_' for sum types can create maintainability issues
┃ ✦ Category: #AntiPattern
┃ ✦ File: ./Graphics/Slicer/Math/Skeleton/Motorcycles.hs
┃
┃ 147 ┃
┃ 148 ┃ [(_,_)] -> error "not enough intersections?"
┃ 149 ┃ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
┃
┃ 💡 Possible solution:
┃ ⍟ Pattern match on each constructor explicitly
┃ ⍟ Add meaningful names to holes, e.g. '_anyOtherFailure'
merging. you can show me the one example later. :)
┃ ✦ Description: Pattern matching on '_' for sum types can create maintainability issues
hehe, my point exactly! funny that i removed it here, but i checked and thought "it only has this one constructor, so whatever". but stan's right, it's more robust to match against Node _ _ _ _ _ _
.
But why did you decide against tidying up the last case?
I hope my comments are useful, but I think it's safe to ignore them all. Can we add stan to the ci now? :-)