Eitan Goldshtrom <thesource...@gmail.com> writes:

> Correction to my last e-mail. I figured out why it worked at first and
> then failed, so I'll refine my question. I'd like the compiler to
> simply put the number 800 everywhere that I put the name "width" in my
> code. Instead it's putting (800 :: Float), or Double or Int, whatever
> I want, but it's restricted to one data type. I want to remove that
> restriction since it is a constant.

It _might_ work by having an explicit type signature for it:

width :: (Num a) => a
width = 800

But I think it will get defaulted to something.

-- 
Ivan Lazar Miljenovic
ivan.miljeno...@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to