Drasil icon indicating copy to clipboard operation
Drasil copied to clipboard

Rename GOOL's `const` to something less commonly used

Open balacij opened this issue 3 years ago • 2 comments

Fine for now, but I think the better change would be to rename const in our classes to something else. Too much danger.

Originally posted by @JacquesCarette in https://github.com/JacquesCarette/Drasil/pull/2969#pullrequestreview-956561840

Any suggestions on what we can make it?

  • 'gConst', as in "gool const"
  • 'const_', appending an underscore
  • 'ctv', as in compile-time static value

balacij avatar Apr 28 '22 14:04 balacij

const_ is not bad. constant would work too. The other two are too obscure/implementation dependent.

JacquesCarette avatar Apr 28 '22 15:04 JacquesCarette

A plain constant sounds the best to me now, too.

balacij avatar Apr 28 '22 16:04 balacij

@balacij is this only used in the "/code/drasil-gool/" directory?

janim2-2004 avatar May 03 '23 16:05 janim2-2004

Admittedly, I'm not sure off the top of my head, you might just need to change it in the defined area (drasil-gool) and let GHC guide you in finding the breakage (and hence things that also need to be renamed), or you can try to find the breakage beforehand using grep. Note that since the ticket is about renaming const to something less commonly used, you might other areas of code using other consts (in particular, the Prelude contains a const function, imported by default in each module), so you will need to be careful when searching!

balacij avatar May 03 '23 16:05 balacij

Could I get help with an error I get when trying to run make pr_ready. After fetching HLint it outputs this error message

sh: line 65: 7z: command not found make: *** [Makefile:364: hot_hlint] Error 127

This does not occur when runnig make test

janim2-2004 avatar May 03 '23 20:05 janim2-2004

It looks like you need to install 7zip. 7z: command not found is the hint. Were you on Windows? Did you follow the steps in the New Workspace Setup guide? If 'yes' to both, we might need to update it!

balacij avatar May 03 '23 21:05 balacij

No I don't have it installed, I think it might be missing from new workspace setup.

janim2-2004 avatar May 04 '23 13:05 janim2-2004

@balacij I downloaded 7 zip, it seems to still not work. I have added the app location to my path, still getting the same issue. @harmanpreet-sagar is also experiencing this.

janim2-2004 avatar May 04 '23 13:05 janim2-2004

Ok, let's open up a ticket about it and continue discussion there.

balacij avatar May 04 '23 13:05 balacij

Was not autoclosed when issue was merged https://github.com/JacquesCarette/Drasil/pull/3372

janim2-2004 avatar May 08 '23 13:05 janim2-2004