Hi, sorry for being lazy in answering. Feel free to take the "Boolean" approach with data Strand, instead of a newtype. As sequences are lazy bytestrings, the performance objections are not valid here, anyways.
Looking forward to the push. Gruss, Christian * Ketil Malde <ke...@malde.org> [08.09.2011 14:15]: > Ketil Malde <ke...@malde.org> writes: > > > Pushed 0.1 to http://malde.org:~ketil/biohaskell/biocore - feel free to > > have a look. > > Unless there are objections, I'm going to call this final, and push it > to hackage. Objections? > > Well, I have a small one, regarding the Strand data type. Christian > suggested that newtype-wrapping an Int would be more performant than an > ADT with two nullary data constructors. Or, in code: > > newtype Strand = Strand Int > plus, minus :: Strand > plus = Strand 0 > minus = Strand 1 > > would be better than > > data Strand = Plus | Minus > > I'm reluctant to use the former, the latter seems so much nicer, and > allows pattern matching on what really is a very simple thing. > > And, personally, I feel that any performance disadvantage is the fault > of Simon and Simon, and should not be fixed by more clumsy code. > Finally, this isn't really likely to be performance bottleneck, is it? > > So again, unless anybody ojects, I'm intending to revert to ADT. > Objections? > > -k > -- > If I haven't seen further, it is by standing in the footprints of giants > _______________________________________________ > Biohaskell mailing list > Biohaskell@biohaskell.org > http://malde.org/cgi-bin/mailman/listinfo/biohaskell
pgprhC7Tg9LsD.pgp
Description: PGP signature
_______________________________________________ Biohaskell mailing list Biohaskell@biohaskell.org http://malde.org/cgi-bin/mailman/listinfo/biohaskell