I’ve released the marching-cubes library on Hackage today. Here is a repository containing some examples. The marching cubes algorithm is used to construct 3D isosurfaces.
Would you know why the Github actions of this repository are unable to build OpenGLRaw?
OpenGLRaw > Cabal-simple_SvXsv1f__3.6.3.0_ghc-9.2.5: Missing dependency on a foreign
OpenGLRaw > library:
OpenGLRaw > * Missing (or bad) C library: GL
OpenGLRaw > This problem can usually be solved by installing the system package that
OpenGLRaw > provides this library (you may need the "-dev" version). If the library is
OpenGLRaw > already installed but in a non-standard location then you can use the flags
OpenGLRaw > --extra-include-dirs= and --extra-lib-dirs= to specify where it is.If the
OpenGLRaw > library file does exist, it may contain errors that are caught by the C
OpenGLRaw > compiler at the preprocessing stage. In this case you can re-run configure
OpenGLRaw > with the verbosity flag -v3 to see the error messages.
That means that you need to install the libgl-dev package (that is the name for Ubuntu/Debian). Although I don’t know how to actually do that with GitHub actions.
Actually the installation works on Windows, but there’s an issue with one of my own modules:
src\Colors\ColorRamp.hs:16:1: error: [-Worphans, -Werror=orphans]
Orphan instance: instance Unbox a => Unbox (Color4 a)
To avoid this
move the instance declaration to the module of the class or of the type, or
wrap the type with a newtype and declare the instance on the new type.
I never knew how to deal with the “orphan instance” warnings. Would you know? Otherwise, how to change the ghc options in order that it doesn’t throw an error for that?
The “best” solution is to upstream the instance to the package which either declares the class or the data structure. When that’s not possible, some people create an intermediate package whose entire job is to provide these instances.
Well in this case, one thread was made only three days after the other. If there was say a six month interval or more, then maybe a different choice would have made sense. Here, one thread hadn’t even fallen out of the top five before the next was made!