On Friday, February 21, 2003, at 06:05 PM, Nick Name wrote:
Reading the paper "Type Classes with Functional Dependencies" by Mark
P.
Jones, I noticed he mentions the "Coerce" class as a way to model the
subtyping relation. I have looked at the article there referred, "How
to
make ad-hoc polymo
Hey all.
I am trying to declare a read-only state monad and a read-write state
monad, so as to distinguish between methods on a data type that are
read-only vs. read-write.
This is the best I could come up with:
newtype ST s a = ST ( s -> (s,a) ) -- read-only
newtype SW s a = SW ( s -> (s,a) ) -
On Fri, 21 Feb 2003 08:05:37 +0100
Nick Name <[EMAIL PROTECTED]> wrote:
> -- Does not type if overlapping instances are allowed
> --
> --instance Functor SList where
> --fmap f End = End
> --fmap f (a:::as) = (call f a):::(fmap f as)
I skipped the declaration of SList, which is the co
Reading the paper "Type Classes with Functional Dependencies" by Mark P.
Jones, I noticed he mentions the "Coerce" class as a way to model the
subtyping relation. I have looked at the article there referred, "How to
make ad-hoc polymorphism less ad-hoc" by Wadler and Blott.
By now, I can't find mo
Hey Everyone,
I am having a hard time making a data structure that I can incrimentally
update. Mostly because dealing with arrays is so tough. Does anyone think
I'm going about this completely the wrong way? This is what I have.
data GameState = GameState {
dTickets :: Array Player (Array T
Hmm, that does seem like alot of code to say such a little thing. Is it
possible to come at the problem from the other direction? By this I mean I
am trying to have two sets of symbols be enumerated together. This solution
I asked for tries to impose the enumeration over the data. Can I define
dat
Shae Matijs Erisson wrote:
> Do you have a version of HXML + (any) namespace support online or otherwise
> available for playing with? I'd like to try it.
Not yet, but stay tuned.
--Joe English
[EMAIL PROTECTED]
___
Haskell mailing list
[EMAIL PRO
Graham Klyne wrote:
> Joe English wrote:
> >What are you looking for in an XML toolkit?
>
> Hi, thanks for responding. My desiderata:
>
> 1. Works with HUGS and GHC (I'm currently developing with HUGS, but
> anticipate using GHC for "production" code).
HXML works with Hugs, GHC, GHCI, and NHC,
Oops! Small bug. See below.
Dean Herington wrote:
> You can't derive Enum Player automatically, but you can program it. Here's one
> way how, using shorter example names.
>
> -- Dean
>
> data E1 = E1a | E1b | E1c deriving (Enum, Bounded, Show, Read)
> data E2 = E2a | E2b | E2c deriving (Enum,
You can't derive Enum Player automatically, but you can program it. Here's one
way how, using shorter example names.
-- Dean
data E1 = E1a | E1b | E1c deriving (Enum, Bounded, Show, Read)
data E2 = E2a | E2b | E2c deriving (Enum, Bounded, Show, Read)
data E = E1 E1 | E2 E2deriving (Show, R
succ Blue cannot return MrX unless Blue and MrX have the same type. What
I meant was that you would say:
'succ (Detective Red)' ==> Detective Green
'succ (Detective Green)' ==> Detective Blue
'succ (Detective Blue)' ==> Fugitive MrX
--
Hal Daume III
"Computer science is no more about
I tried this. It doesn't work. succ Blue is an exception. Anybody else know
how this should be done?
Thanks,
-mike
On Thu, Feb 20, 2003 at 08:00:04AM -0800, Hal Daume III wrote:
> > Question 1: Is there an easier, more elegant way to write this code?
>
> For the most part, no.
>
> > Question 2:
> "Malcolm" == Malcolm Wallace <[EMAIL PROTECTED]> writes:
Malcolm> About a year and half ago, someone did some work on
Malcolm> adding namespaces to HaXml, but it never got folded back
Malcolm> into the main distribution. It may be possible to port
Malcolm> that solution into
Graham Klyne had some questions about XML parsing in Haskell. Here is
the current state of play with HaXml.
> 1. Works with HUGS and GHC (I'm currently developing with HUGS, but
> anticipate using GHC for "production" code).
HaXml certainly works with ghc (and ghci). It probably still works
wi
Joe English <[EMAIL PROTECTED]> writes:
> As far as HXML goes, I have a rough sketch of an
> implementation of XML namespace support, not yet
> finished or released. (This is a somewhat thorny
> problem; implementing XMLNS is not hard, but implementing
> it in a sane way requires some ingenuity.)
> Question 1: Is there an easier, more elegant way to write this code?
For the most part, no.
> Question 2: Is there a way to express the following relationship?
> I want to have a set of symbols with ordering and another set that is
> part of that ordering but with a different parent. For examm
Andrew J Bromage wrote (on 20-02-03 10:26 +1100):
> All that is required of a theorem is that it is correct.
>
> A tool, on the other hand, not only has to work (i.e. it has to
> correctly accomplish some task), it also has to be safe to use, its
> controls must be meaningful to the intended user,
At 08:52 AM 2/19/03 -0800, Joe English wrote:
Graham Klyne wrote:
>
> Which leads me to a question: starting from the haskell.org web page, I
> have identified three XML parsers in Haskell (HaXml, hXML, Haskell XML
> Toolbox), none of which seem to support XML namespaces and only one of
> which
[This is a reminder re-send. Apologies if you receive more than
one copy of this message. -- The Organizers.]
=
CALL FOR PAPERS & PARTICIPATION
***
19 matches
Mail list logo