[Haskell-beginners] development workflow ?

John M. Dlugosz ngnr63q02 at sneakemail.com
Fri Apr 25 16:26:44 UTC 2014

On 4/25/2014 10:06 AM, Daniel Trstenjak wrote:
> On Fri, Apr 25, 2014 at 09:58:04AM -0500, John M. Dlugosz wrote:
>> I have no idea what's a good idea; I'm just showing what I've
>> learned thus far.  What is the right way to develop a package?
> Why have you copied gloss?
> Have you just added a new function?
> Have you modified the code?

To be specific, in Graphics/Gloss/Internals/Render/Circle.hs

	{-# INLINE circleSteps #-}
	circleSteps :: Float -> Int
	circleSteps sDiam
	        | sDiam < 8     = 8
	        | sDiam < 16    = 16
	        | sDiam < 32    = 32
	        | otherwise     = round sDiam

Originally, the otherwise branch said 64.  When drawing my Pappas Chain, the outer circle 
was not tangent to all the little circles, but clipped through them and when zoomed was 
obviously a polygon and not a circle at all.

So, why's it limited to 64?  Maybe we don't want to go crazy if zoomed in deeply, and most 
of it doesn't show anyway.  So I thought I might tinker with it some more to make it 
proper circle quality only where it intersects the viewport, and crude outside (if not 
omitted entirely).

I might also turn on anti-aliasing, which if not exposed already means adding a function 
in the private guts to change the setting of the OpenGL handle.

But more generally, everyone who develops a package and continues to develop a new version 
while the old one is installed and used by other components must be doing something 
(sandbox for this case, I think).  And even if a body of code is not intended to be a 
general purpose library shipped on its own, a big project ought to be divided into parts, 
so it is desirable to know which files changed and do far less work to build than to 
compile every single source file again.


More information about the Beginners mailing list