[Haskell-cafe] newbie question about Functional dependencies conflict between instance declarations:.....

2013-07-05 Thread Nicholls, Mark
Hello, I largely don't know what I'm doing or even trying to do, it is a voyage into the unknownbutif I go... {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} class Foo x y | x -

Re: [Haskell-cafe] newbie question about Functional dependencies conflict between instance declarations:.....

2013-07-05 Thread Nicholls, Mark
London NW1 8TT | e: nicholls.m...@vimn.commailto:m...@vimn.com T: +44 (0)203 580 2223 [Description: cid:image001.png@01CD488D.9204D030] From: Tikhon Jelvis [mailto:tik...@jelv.is] Sent: 05 July 2013 2:08 PM To: Nicholls, Mark Cc: haskell-cafe Subject: Re: [Haskell-cafe] newbie question about

RE: [Haskell-cafe] type questions again....

2008-01-12 Thread Nicholls, Mark
] Sent: Fri 11/01/2008 18:03 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] type questions again On Jan 11, 2008 5:47 PM, Nicholls, Mark [EMAIL PROTECTED] wrote: If you wrap an existential type up in a constructor, not much changes: If you wrap a what

[Haskell-cafe] type questions again....

2008-01-11 Thread Nicholls, Mark
Can someone explain (in simple terms) what is meant by existential and universal types. Preferably illustrating it in terms of logic rather than lambda calculus. There's plenty of stuff out there on itbut most of it seems double dutch (no offense to the dutch intended).

RE: [Haskell-cafe] type questions again....

2008-01-11 Thread Nicholls, Mark
-Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: 11 January 2008 17:11 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] type questions again 2008/1/11 Nicholls, Mark [EMAIL PROTECTED]: Can someone explain (in simple terms

[Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
:[EMAIL PROTECTED] On Behalf Of Peter Verswyvelen Sent: 03 January 2008 12:02 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: RE: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell? Hi Mark, foo1 :: Int - obj - String Yep...I think that's what I'd dothough

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
on? -Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 13:14 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] confusion about 'instance' On Jan 10, 2008 1:03 PM, Nicholls, Mark [EMAIL PROTECTED] wrote: Should be straight forward

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
class A a type T = (forall x.Num x=x) instance A T type declares a synonym, like #define in C - but working only on types. So, essentially, you wrote Yep that's fine.. instance A (forall x.Num x = x) Yep which is not very Haskelly. Hmmm... I am simply trying to

RE: Re[2]: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
-Original Message- From: Bulat Ziganshin [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 13:36 To: Nicholls, Mark Cc: Luke Palmer; haskell-cafe@haskell.org Subject: Re[2]: [Haskell-cafe] confusion about 'instance' Hello Mark, Thursday, January 10, 2008, 4:25:20 PM, you

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
Thanks for your response, I think you helped me on one of my previous abberations. Hmmmthis all slightly does my head inon one hand we have typesthen type classes (which appear to be a relation defined on types)then existential types...which now appear not to be treated

RE: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
-Original Message- From: Jules Bean [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 14:22 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] confusion about 'instance' Nicholls, Mark wrote: My confusion is not between OO classes

RE: Re[2]: [Haskell-cafe] confusion about 'instance'....

2008-01-10 Thread Nicholls, Mark
Someone said something about having 2 instances of the type in the typeclass.maybe I misinterpreted it. -Original Message- From: Luke Palmer [mailto:[EMAIL PROTECTED] Sent: 10 January 2008 14:12 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject: Re: Re[2

RE: Re[6]: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-04 Thread Nicholls, Mark
You may be right...but learning is not an atomic thingwherever I start I will get strange things happening. -Original Message- From: Bulat Ziganshin [mailto:[EMAIL PROTECTED] Sent: 03 January 2008 18:59 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject: Re[6

RE: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-03 Thread Nicholls, Mark
I was thinking more along type classesand then I was going to throw some spanners in the works From: Ryan Ingram [mailto:[EMAIL PROTECTED] Sent: 02 January 2008 17:41 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe

RE: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-03 Thread Nicholls, Mark
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicholls, Mark Sent: Wednesday, January 02, 2008 5:41 PM To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell? I'm trying to translate some standard C

RE: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-03 Thread Nicholls, Mark
To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell? Hello Mark, Wednesday, January 2, 2008, 7:40:31 PM, you wrote: I'm trying to translate some standard C# constucts into Haskell... some it's meaningless. read

RE: Re[2]: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-03 Thread Nicholls, Mark
'interface' implementation and type class instance declaration. -Original Message- From: Bulat Ziganshin [mailto:[EMAIL PROTECTED] Sent: 03 January 2008 10:54 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject: Re[2]: [Haskell-cafe] Is there anyone out there who can

RE: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-03 Thread Nicholls, Mark
Ahh ok I see what is meant by the parameter order -Original Message- From: Peter Verswyvelen [mailto:[EMAIL PROTECTED] On Behalf Of Peter Verswyvelen Sent: 03 January 2008 12:02 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: RE: [Haskell-cafe] Is there anyone out there who

RE: Re[4]: [Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-03 Thread Nicholls, Mark
I do not necessarily disagree But if I can identify the overlapthen I have leant the overlap...on the cheap. -Original Message- From: Bulat Ziganshin [mailto:[EMAIL PROTECTED] Sent: 03 January 2008 14:39 To: Nicholls, Mark Cc: Bulat Ziganshin; haskell-cafe@haskell.org Subject

[Haskell-cafe] Is there anyone out there who can translate C# generics into Haskell?

2008-01-02 Thread Nicholls, Mark
I'm trying to translate some standard C# constucts into Haskell... some of this seems easy Specifically 1) Interface IX { } 2) Interface IXA { } 3) Interface IXA Where A : IY { } 4) Interface IXA : IZ Where A : IY { } I can take a punt at the first 2but then it

[Haskell-cafe] what does @ mean?.....

2007-12-28 Thread Nicholls, Mark
a as 3 and b as 5... so now we have mulNat' 3 5 5 but what does the x@(S a) mean? in mulNat' x@(S a) y orig From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicholls, Mark Sent: 21 December 2007 17:47 To: David Menendez Cc: Jules

RE: [Haskell-cafe] what does @ mean?.....

2007-12-28 Thread Nicholls, Mark
it saves the effort and space of retyping really long expressions. And what is even more important, in case an error is made when choosing the pattern, you only have to correct it in one place. On Dec 28, 2007 12:05 PM, Nicholls, Mark [EMAIL PROTECTED] wrote: Hello, I wonder if someone could answer

RE: [Haskell-cafe] what does @ mean?.....

2007-12-28 Thread Nicholls, Mark
Lovelythank you very muchanother small step forward. -Original Message- From: Chaddaï Fouché [mailto:[EMAIL PROTECTED] Sent: 28 December 2007 11:29 To: Nicholls, Mark Cc: Alfonso Acosta; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] what does @ mean?. 2007/12/28

[Haskell-cafe] translating some C# abstractions into Haskell....

2007-12-28 Thread Nicholls, Mark
Lets say I've got Interface IFooX,Y Where X : IBar Where Y : IBar { } Would seem to translate roughly to class (IBar x, IBar y) = IFoo foo x y ? (or does it?) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nicholls, Mark Sent: 28

[Haskell-cafe] nice simple problem for someone struggling....

2007-12-21 Thread Nicholls, Mark
I'm just trying to pick up the basicsand I've managed to write this code...which remarkably works.. module Main where data SquareType = SquareConstructor Int class ShapeInterface shape where area :: shape-Int data ShapeType = forall a. ShapeInterface a =

RE: [Haskell-cafe] nice simple problem for someone struggling....

2007-12-21 Thread Nicholls, Mark
ReallyI'm sure I tried that...(as it seemed obvious) ... and it failedbut I'll have another go -Original Message- From: Jules Bean [mailto:[EMAIL PROTECTED] Sent: 21 December 2007 15:33 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] nice simple

RE: [Haskell-cafe] nice simple problem for someone struggling....

2007-12-21 Thread Nicholls, Mark
: Jules Bean [mailto:[EMAIL PROTECTED] Sent: 21 December 2007 15:33 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] nice simple problem for someone struggling Nicholls, Mark wrote: *instance* ShapeInterface SquareType *where* area (SquareConstructor sideLength

RE: [Haskell-cafe] nice simple problem for someone struggling....

2007-12-21 Thread Nicholls, Mark
?if notwhy not? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Menendez Sent: 21 December 2007 17:05 To: Nicholls, Mark Cc: Jules Bean; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] nice simple problem for someone struggling

RE: [Haskell-cafe] nice simple problem for someone struggling....

2007-12-21 Thread Nicholls, Mark
Yes sorrybut this still fails with `numberType1' is a rigid type variable bound by From: Brent Yorgey [mailto:[EMAIL PROTECTED] Sent: 21 December 2007 17:29 To: Nicholls, Mark Cc: Jules Bean; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe

RE: [Haskell-cafe] nice simple problem for someone struggling....

2007-12-21 Thread Nicholls, Mark
:[EMAIL PROTECTED] On Behalf Of David Menendez Sent: 21 December 2007 17:05 To: Nicholls, Mark Cc: Jules Bean; haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] nice simple problem for someone struggling On Dec 21, 2007 11:50 AM, Nicholls, Mark [EMAIL PROTECTED] wrote: Now I have

[Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
I'm trying to teach myself HaskellI've spent a few hours going through a few tutorialsand I sort of get the basics... My interest in Haskell is specifically around the strength of the type system. After many years of OOP though my brain is wired up to construct software in that

RE: [Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
December 2007 11:04 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] OOP'er with (hopefully) trivial questions. On 17 Dec 2007, at 10:46, Nicholls, Mark wrote: I can obviously at a later date add a new class Triangle, and not have to touch any of the above code

RE: [Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
Ooo The constructor of a newtype must have exactly one field but `R' has two In the newtype declaration for `Rectangle' It doesn't like newtype Rectangle = R Int Int -Original Message- From: Thomas Davie [mailto:[EMAIL PROTECTED] Sent: 17 December 2007 11:04 To: Nicholls, Mark Cc

RE: [Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
Ok... Thanks I need to revisit data and newtype to work out what the difference is I think. -Original Message- From: Jed Brown [mailto:[EMAIL PROTECTED] On Behalf Of Jed Brown Sent: 17 December 2007 12:04 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] OOP'er

RE: [Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
. -Original Message- From: Thomas Davie [mailto:[EMAIL PROTECTED] Sent: 17 December 2007 12:35 To: Nicholls, Mark Cc: Haskell Cafe Subject: Re: [Haskell-cafe] OOP'er with (hopefully) trivial questions. On 17 Dec 2007, at 12:22, Nicholls, Mark wrote: Ok... Thanks I need to revisit data

RE: [Haskell-cafe] Re: OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of apfelmus Sent: 17 December 2007 12:34 To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Re: OOP'er with (hopefully) trivial questions. Nicholls, Mark wrote: data Shape = Circle Int | Rectangle Int

RE: [Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
Ahhh I'll give it a read. thanks -Original Message- From: Henning Thielemann [mailto:[EMAIL PROTECTED] Sent: 17 December 2007 13:05 To: Nicholls, Mark Cc: haskell-cafe@haskell.org Subject: Re: [Haskell-cafe] OOP'er with (hopefully) trivial questions. On Mon, 17 Dec 2007, Nicholls

RE: [Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
No neither do II think we can drop that bitI think I got confused about it for a second.not unsurprisingly. From: Brent Yorgey [mailto:[EMAIL PROTECTED] Sent: 17 December 2007 15:38 To: Nicholls, Mark Cc: Thomas Davie; Haskell Cafe Subject: Re

RE: Re[2]: [Haskell-cafe] OOP'er with (hopefully) trivial questions.....

2007-12-17 Thread Nicholls, Mark
] Sent: 17 December 2007 16:37 To: Nicholls, Mark Cc: Henning Thielemann; haskell-cafe@haskell.org Subject: Re[2]: [Haskell-cafe] OOP'er with (hopefully) trivial questions. Hello Mark, Monday, December 17, 2007, 4:47:50 PM, you wrote: I'll give it a read. http://www.haskell.org