David Powell <david.pow...@monash.edu> writes:

> On 13 July 2012 13:17, Dan Fornika <dforn...@gmail.com> wrote:

>> newtype Offset = Offset { unOff :: Int64 } deriving
>> (Show,Eq,Ord,Num,Enum,Real,**Integral,Typeable)

You should also be able to use fromIntegral to convert from Offsets to
arbitrary numeric types.

> I think the version of Bio.Sequence.SeqData that you took that function
> from is using "type Offset = Int64" which is why it works there. 

Yes, when factoring out biocore, we decided to make newtypes for various
types in order to improve type safety.  I'm not 100% sure this is always
the right thing to do, sometimes fast and loose is what works best - but
in general it's better to err on the side of safety.

-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

Reply via email to