Hi
If you are working with characteristic functions (Point - Bool or
Point - Colour...) the common way to do this is to manufacture a Num
instance for functions. This gives you syntax overloading of the (+,
-, *) operators. Similarly you might want to overload (or have to
overload) Floating,
Great job Stephen.
Thank for explaining . I got it to work.
On Tue, Apr 20, 2010 at 9:21 AM, Stephen Tetley stephen.tet...@gmail.comwrote:
Hi
If you are working with characteristic functions (Point - Bool or
Point - Colour...) the common way to do this is to manufacture a Num
instance for
Hello
I am sorry for the silly question.
I have a function as the following
func:: ((Float,Float) -Bool) - Float - ((Float,Float) - Bool)
I am trying to make calculation in this type ((Float,Float) -Bool) with
Float and then pass the information to ((Float,Float) - Bool)
Thank again
Can you at least give an example of how you intend to use this func?
Since you do not describe it's behaviour, it is very hard to make a useful
comment (at least for me)
Best,
On 19 April 2010 16:54, Mujtaba Boori mujtaba.bo...@gmail.com wrote:
Hello
I am sorry for the silly question.
I
sorry
ok I am trying to make these calculation
func (x,y) s dg =((x*(cos dg) - y*(sin dg)),(x*(sin dg) - y*(cos dg)))
This work for type (Float - Float)
but how can make it work with ((Float - Float) - Bool)
because my main function that I want use with. it takes (Float,Float)
-Bool) I
First of all, your function
func (x,y) s dg =((x*(cos dg) - y*(sin dg)),(x*(sin dg) - y*(cos dg)))
does NOT work for type (Float - Float), unless you mean that that is
the type of the unused parameter s. Also, your desired type ((Float -
Float) - Bool) itself looks suspicious. It must accept
Thanks Dan. Great help
but my problem has not solved yet
This doesn't work for type ((Float - Float)-Bool)
to make it easier ignore the rotation and suppose I want just multiplay with
whatever (x ,y) and return the result to this type ((Float - Float)-Bool)
note this type is shorten and replace