[C2hs] darcs patch: Convert an accented surname in a comment... (and 5 more)

Duncan Coutts duncan.coutts at googlemail.com
Fri Nov 12 13:10:27 EST 2010


On 12 November 2010 12:32,  <will at willthompson.co.uk> wrote:
> 6 patches for repository http://code.haskell.org/c2hs:

Cool, thanks for all this!

> Mon Nov  8 23:46:25 GMT 2010  will at willthompson.co.uk
>  * Convert an accented surname in a comment to UTF-8
>
>  hasktags makes the (reasonable) assumption that source files are UTF-8, and
>  gets very upset if they're not.

Aye. GHC doesn't bother decoding comments so we miss these :-(

> Tue Nov  9 06:02:13 GMT 2010  will at willthompson.co.uk
>  * Fix generation of superclass instances
>
>  Previously, specifying a superclass in a {# class #} rule would generate
>  incorrect code. For instance, the 'pointer' test case includes the following:
>
>  > {#pointer *Point as APoint newtype#}
>  > {#class APointClass APoint#}
>  >
>  > {#pointer *ColourPoint as AColourPoint newtype#}
>  > {#class APointClass => AColourPointClass AColourPoint#}
>
>  This generates an incorrect instance of APointClass for AColourPoint, as
>  follows:
>
>  > instance APointClass AColourPoint where
>  >   aColourPoint (AColourPoint p) = AColourPoint (castPtr p)
>  >   fromAColourPoint (AColourPoint p) = AColourPoint (castPtr p)
>
>  This was due to the code generator using the name of the type being defined
>  rather than the name of the superclass type, which was due to a missing
>  apostrophe. This is my favourite kind of bug fix.

Ok, so you're saying that nobody could possibly have been using this
feature because it plainly does not work? So it's safe to change the
behaviour without doing a major version bump?

Duncan


More information about the C2hs mailing list