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 -
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
]
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
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).
-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
:[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
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
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
-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
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
-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
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
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
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
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
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
'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
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
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
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
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
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
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
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
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 =
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
: 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
?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
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
:[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
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
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
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
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
.
-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
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
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
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
]
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
39 matches
Mail list logo