Awesome. It worked. Haskell continues to impress me. Thanks for the help
everyone.
-Eitan
On 7/19/2010 4:42 AM, Max Bolingbroke wrote:
Use NoMonomorphismRestriction or give an explicit type signature:
width :: Num a => a
width = 800
Max
___
H
Use NoMonomorphismRestriction or give an explicit type signature:
width :: Num a => a
width = 800
Max
On 19 July 2010 09:17, Eitan Goldshtrom wrote:
> 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 simpl
Eitan Goldshtrom 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
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
One point of clarification that'd be nice. I'm getting some type errors
that I wasn't getting before, so I'd just like to know something about
the inline pragma. I have
width = 800
{-# INLINE width #-}
main = (truncate width, fromIntegral width)
Now when I ran this program it seemed to work a
On Sunday 18 July 2010 23:07:38, Eitan Goldshtrom wrote:
> So just so I get this straight, the following are equivalent to the
> computer, after compiling:
>
> 1.
> fact = 10
> {-# INLINE fact #-}
>
> func x = x * fact
>
> 2.
> func x = x * 10
I'm not sure if they're equivalent when compiled witho
So just so I get this straight, the following are equivalent to the
computer, after compiling:
1.
fact = 10
{-# INLINE fact #-}
func x = x * fact
2.
func x = x * 10
I'm also curious as to what the {-# #-} brackets represent. I've never
seen those before.
-Eitan
On Sun, Jul 18, 2010 at 10:19 PM, Eitan Goldshtrom
wrote:
> Silly question, but I can't find the answer on the net. I think I'm just
> using the wrong words in my search. I'm looking for a way to create constant
> expressions in Haskell. The C/C++ equivalent of what I'm talking about is
>
> #defin
On Sun, Jul 18, 2010 at 5:19 PM, Eitan Goldshtrom
wrote:
> Silly question, but I can't find the answer on the net. I think I'm just
> using the wrong words in my search. I'm looking for a way to create constant
> expressions in Haskell. The C/C++ equivalent of what I'm talking about is
>
> #define
On Sunday 18 July 2010 22:19:21, Eitan Goldshtrom wrote:
> Silly question, but I can't find the answer on the net. I think I'm just
> using the wrong words in my search. I'm looking for a way to create
> constant expressions in Haskell. The C/C++ equivalent of what I'm
> talking about is
>
> #defin
Silly question, but I can't find the answer on the net. I think I'm just
using the wrong words in my search. I'm looking for a way to create
constant expressions in Haskell. The C/C++ equivalent of what I'm
talking about is
#define NAME VALUE
I want an expression, or really just numbers for w
11 matches
Mail list logo