://hackage.haskell.org/package/Chart-diagrams
Tim Docker
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
, 2013 7:24 AM, Tim Docker t...@dockerz.net wrote:
Hi,
Has anyone noticed problems with the mailman instance running at
projects.haskell.org? As best I can see there are no new posts in any of the
hosted list archives since mid April. I know that there have been posts made
to ch
Hi,
Has anyone noticed problems with the mailman instance running at
projects.haskell.org? As best I can see there are no new posts in any of
the hosted list archives since mid April. I know that there have been
posts made to ch...@projects.haskell.org in May, and these have neither
be
On 27/04/13 15:21, Christopher Howard wrote:
Hi. I've got this work situation where I've got to do all my work on
/ancient/ RHEL5 systems, with funky software configurations, and no root
privileges. I wanted to install GHC in my local account, but the gnu
libc version is so old (2.5!) that I
On 18/03/13 19:07, s9gf4ult wrote:
nor STM, becuase IO is not acceptable inside STM transaction.
I just need some thread-safe blocking variable like MVar
modifyMVar :: MVar
http://hackage.haskell.org/packages/archive/base/4.6.0.1/doc/html/Control-Concurrent-MVar.html#t:MVar
a - (a - IO
On 12/03/13 05:26, Jason Dagit wrote:
Myself and several of my friends would find it useful to have a
plotting library that we can use from ghci to quickly/easily visualize
data. Especially if that data is part of a simulation we are toying
with. Therefore, this proposal is for: A gnuplot-,
On 04/03/13 07:22, Arnaud Bailly wrote:
Then I managed to install splot and timeplot. I then tried to use
Chart to draw a simple chart, following
http://hackage.haskell.org/packages/archive/Chart/0.16/doc/html/Graphics-Rendering-Chart-Simple.html
and it hang forever with a CPU at 100%.
As
On 29/01/2013, at 12:43 PM, Bob Hutchison hutch-li...@recursive.ca wrote:
The immediate problem is mapping an input to the system, some json message
containing a reference to the 'thing' (like a key of some kind). I have to
take that reference and find the thing and operate on it. All
Hi Eric,
In a previous project, I chose vty over ncurses:
- you can write your own event loop, and hence handle different
event sources.
- more liberal license (BSD3 versus GPL)
Tim
On 26/01/13 19:24, Erik de Castro Lopo wrote:
Hi all,
I am in the process of writing a Haskell
Does this new release included the sandbox functions discussed in this
blog post:
http://blog.johantibell.com/2012/08/you-can-soon-play-in-cabal-sandbox.html
?
Tim
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 01/09/12 04:00, timothyho...@seznam.cz wrote:
I'd have to say that there is one(and only one) issue in Haskell that
bugs me to the point where I start to think it's a design flaw:
It's much easier to type things over generally than it is to type
things correctly.
Say we have a
data
On 02/09/12 20:35, timothyho...@seznam.cz wrote:
It seems to be a probability approaching law, that I run into this for
a given multi-constructor type. Regardless of it's purpose.
Maybe your large multi-constructor types are too monolithic? Again it's
hard to know given a fabricated
Here's the steps I had to go go to get ghc7.0 working on RHEL 5.6:
http://twdkz.wordpress.com/2011/12/21/installing-ghc-7-0-3-and-the-haskell-platform-on-rhel-5-6/
I expect that the same steps will work for ghc 7.4. I need to use a more
recent version of gcc that than supplied with RHEL5.6.
On 14/06/12 18:36, Peter Simons wrote:
it might be of interest to know that the Nix package manager [1] offers that
functionality too, but it can install such Haskell environments on all Linux
variants and on MacOS X without requiring superuser privileges.
Is this actually the case? When I
On 22/11/2011, at 10:55 AM, Bryan O'Sullivan wrote:
Be aware that Chart is pretty slow on large data sets.
I've noticed this too. I believe the issue is with the cairo bindings
- hopefully a new version
of gtk2hs will fix this:
I'm getting a stack overflow exception in code like this:
-- applyAction :: A - IO [B]
vs - fmap concat $ mapM applyAction sas
return vs
I don't get it if I change the code to this:
-- applyAction :: A - IO [B]
mapM_
On 21/09/11 02:39, Heinrich Apfelmus wrote:
Tim Docker wrote:
I'm getting a stack overflow exception in code like this:
-- applyAction :: A - IO [B]
vs - fmap concat $ mapM applyAction sas
return vs
I don't get it if I change the code
On 09/09/2011, at 8:19 PM, John Lato wrote:
Agreed. Whenever I'd like to use mapM (or any other function for
which a *M_ is available), I've found the following rules helpful:
1. If I can guarantee the list is short (~ n=20), go ahead and use
mapM
2. Otherwise use mapM_, foldM_, or
The +RTS -s runtime arguments give some useful details the memory
usage of a program on exit. eg:
102,536 bytes allocated in the heap
2,620 bytes copied during GC
36,980 bytes maximum residency (1 sample(s))
28,556 bytes maximum slop
1 MB
I'd like to build the haskell platform against a recent GHC snapshot,
for testing purposes.
I see that I can download the source for the platform from:
http://lambda.galois.com/hp-tmp/2011.2.0.1/haskell-platform-2011.2.0.1.tar.gz
with instructions:
On 07/06/11 14:03, Brandon Allbery wrote:
On Tue, Jun 7, 2011 at 07:34, Tim Dockert...@dockerz.net wrote:
do others go about testing their code with many hackage dependencies against
a new ghc? I would have expected that the first thing to do would be get the
We don't, for the most part;
On 14/04/2011, at 6:24 PM, Simon Marlow wrote:
I made some changes to the storage manager in the runtime today, and
fixed the slop problem with your program. Here it is after the
changes:
14,928,031,040 bytes allocated in the heap
313,542,200 bytes copied during GC
18,044,096
On Mon, Mar 21, 2011 at 9:59 AM, I wrote:
My question on the ghc heap profiler on stack overflow:
http://stackoverflow.com/questions/5306717/how-should-i-interpret-the-output-of-the-ghc-heap-profiler
remains unanswered :-( Perhaps that's not the best forum. Is there someone
here prepared to
On 22/03/11 05:33, Daniel Fischer wrote:
On Wednesday 23 March 2011 03:32:16, Tim Docker wrote:
Is the slop number above likely to be a significant contribution to net
memory usage?
Yes, absolutely.
Are there any obvious reasons why the code below could be
generating so much?
I suspect
On 22/03/11 10:47, Brandon Moore wrote:
It sounds like the space is allocated but unused pages. Unless you have messed
with some kernel memory manager settings, unused virtual pages consume no
physical RAM.
You could confirm this by using ps to check how much RSS is actually used,
compared to
My question on the ghc heap profiler on stack overflow:
http://stackoverflow.com/questions/5306717/how-should-i-interpret-the-output-of-the-ghc-heap-profiler
remains unanswered :-( Perhaps that's not the best forum. Is there
someone here prepared to explain how the memory usage in the heap
:
http://dockerz.net/software/chart.html
Thanks to Malcolm Wallace, Eugene Kirpichov, and Matt Brown for their
contributions to this release.
Tim Docker
--
New features in v0.14
-
* Plot Type: AreaSpots4D
On 25/09/10 06:57, rgowka1 wrote:
What are the libraries to use in Haskell to generate a stock
candlestick chart like
http://stockcharts.com/h-sc/ui?s=SPYp=Db=5g=5id=p05007254056
I will use Finance-Quote-Yahoo to get the quote data from Yahoo.
The chart library:
On 27/07/10 21:37, bri...@aracnet.com wrote:
I can run any of the examples from the home page that render to screen.
the AM chart is the one I'm using.
BTW, the AM chart has a bug. It does not include the proper color
modules and needs a (opaque color) instead of just color.
gtk2hs is 11
I've notice a behaviour of quickcheck that is unexpected to me. With
this code:
import Test.QuickCheck
main = check myconfig
((\v - v == v) :: (Maybe Double,Maybe Double) - Bool)
myconfig = defaultConfig{configMaxTest=10,
configEvery = \n args - show n ++ :\n
On 5 May 2010 09:01, Ozgur Akgun ozgurak...@gmail.com wrote:
your quick check property (in a different way of writing) is
the following:
prop_1 :: Maybe Double - Bool
prop_1 v = v == v
I think you misunderstood me. The property was fabricated just for
On May 5, 10:57 pm, Ozgur Akgun ozgurak...@gmail.com wrote:
Let me try to understand you then. What happens when you run the following
command in ghci?
sample (arbitrary :: Gen (Maybe Int, Maybe Int) )
Do you still always get (Just _, Just _) or (Nothing, Nothing) pairs, or do
you also get
Jason:
Thanks for the reply.
I suspect the solution is to correctly tell Haskell what type you
expect and then hopefully HDBC will do the conversion. For example,
using fromSql:
http://software.complete.org/static/hdbc/doc/Database-HDBC.html#v%
3AfromSql
Yes. I can use fromSql to
John Goerzen wrote:
Tim Docker wrote:
Yes. I can use fromSql to convert the result back to an appropriate
numerical type. But internally the numeric data has still been converted
to an intermediate string representation. I'm wondering if this is
intentional, and whether it matters.
Yes
I'm experimenting with haskell and relational databases. I have
successfully coupled unixodbc + freetds + hdbc-odbc, and can make
trivial queries. However, I'm surprised at the result types:
$ ghci
GHCi, version 6.10.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking
I'm having some trouble with excessive memory use in a program that uses
a lot of IORefs. I was able to write a much simpler program which
exhibits the same sort of behavior. It appears that modifyIORef and
writeIORef leak memory; perhaps they keep a reference to the old
value. I tried
Thanks for the tip, although it seems tricky to get it right. I wonder
why there is no strict version of atomicModifyIORef?
Dually there might be a strict version of IORef datatype.
Alternatively, you could use STM, where you can write your own atomic
update function, which has the strictness
andrewcoppin:
The problem seems to boil down to this: The Binary instance for
Double (and Float, by the way) is... well I guess you could argue
it's very portable, but efficient it isn't. As we all know, an
IEEE-754 double-precision floating-point number occupies 64 bits;
1 sign bit, 11
On a related matter, I am using Data.Binary to serialise data from
haskell
for use from other languages. The Data.Binary encoding of a Double is a
long
integer for the mantissa, and an int for the exponent. This doesn't
work too well for interacting with other languages as I'd need to have
an
I think that multi-threading in combination with laziness makes space
usage harder to manage. In fact, just today
I have discovered a problem with a long running server process with a
subtle space leak.
With a regular process that communicates with the outside world via IO,
I know that the act of
I think that multi-threading in combination with laziness makes space
usage harder to manage. In fact, just today
I have discovered a problem with a long running server process with a
subtle space leak.
With a regular process that communicates with the outside world via IO,
I know that the act of
documentation.
-Original Message-
From: haskell-cafe-boun...@haskell.org
[mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Tim Docker
Sent: Thursday, 7 May 2009 6:04 PM
To: haskell-cafe@haskell.org
Subject: RE: [Haskell-cafe] Is Haskell a Good Choice for
WebApplications?(ANN: Vocabulink
While writing an OrgFile is fairly easy, reading (and
accessing inner parts) of an org file is very tedious,
and modifying them is horrendous.
Have you looked at
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/data-accessor
It's something I've used successfully when wanting to
On 06/12/2008, at 6:32 AM, Andrew Coppin wrote:
Tim Docker wrote:
If you implement your drawing logic as a
function from time to the appropriate render actions, ie
| import qualified Graphics.Rendering.Cairo as C
| | type Animation = Time - C.Render ()
then you just need to call
This is a haskell + networking question...
I have a multi threaded haskell server, which accepts client
connections, processes their requests, and returns results. It currently
works as desired, except where a client drops a connection whilst the
server is processing a request. In this
It seems that the correct course of action is to design a DSL for
declaratively describing animated line art. Does anybody have ideas
about what such a thing might look like?
Someone else already mentioned FRAN and it's ilk. But perhaps you don't
need something that fancy. If you implement your
Ketil Malde wrote:
My apologies for side-tracking, but does anybody have performance
numbers for STM? I have an application waiting to be written using
STM, boldly parallelizing where no man has parallelized before, but
if it doesn't make it faster, the whole excercise gets a lot less
Chart-0.9 is now available via hackage and a darcs repository.
This is a library for drawing 2D charts. It relies upon the haskell
cairo binding that is part of gtk2hs, and hence supports several
backend output formats (png, pdf, ps, etc).
Further information is available here:
I have a typeclass related question that I have been puzzling over.
In a library I am working on, I have a series of functions for
converting values to Renderables:
| labelToRenderable :: Label - Renderable
| legendToRenderable :: Legend - Renderable
| axisToRenderable :: Axis v - Renderable
|
Also, MPTC take me out of the world of haskell 98, which I was trying
to avoid.
Why. Everyone does it,
Well, it's a library that others might use, so I would prefer to avoid
using language extensions, especially functional deps which I don't
understand, and which seem to have an uncertain
I've discussed the license of data-accessor with it's authors (Luke
Palmer Henning Thieleman). They are ok with changing it to BSD3. So I
don't think the license will be a reason not to use it.
Tim
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ganesh
Dan Weston wrote:
Tim Docker wrote:
That differs from my experience. Most segfaults that *I've* caused
(in
C or C++) have been due to dereferencing null pointers. Type safety
does help you here, in that Maybe lets you distinguish the types of
things that are optionally present from
David Roundy wrote:
Which illustrates the point that it's not type safety
that protects us from segfaults, so much as bounds checking,
and that's got a non-trivial runtime cost. At least, most
segfaults that *I've* caused (in C or C++) have been from
overwriting the bounds of arrays, and
For access to nested record fields I implemented the record-access
package. Unfortunately the field accessors must still be written manually.
http://darcs.haskell.org/record-access/src/Data/Accessor/Example.hs
I looked for this on hackage, but found instead this:
Neal Alexander wrote:
I was using the HaskellCharts library and needed the same two things; so
i rolled a quick and dirty pie chart generator (Barchart is on the TODO
list).
http://72.167.145.184:8000/Screenshot.png
http://72.167.145.184:8000/PieChart.hs
Nice! Do you mind if I refactor
Peter wrote:
Has anyone got some code for drawing charts? I don't mean
graphs of functions, ala
http://dockerz.net/twd/HaskellCharts
...
I would like something that can generate PNGs in memory, i.e. not
directly to a file.
The library at the above URL supports a range of backends through
| An interesting critique of OCaml.
|
| http://enfranchisedmind.com/blog/2008/05/07/why-ocaml-sucks/
Interesting to me is that my pet ocaml peeve is not there: namely the
lack of convenient operator overloading. Admittedly I only used ocaml
for 6 months, but I never adapted to needing to write
A post to announce that Chart-0.6 is now available from it's darcs
repository and from hackage.
This is a library for drawing 2D charts. It relies upon the haskell
cairo binding that is part of gtk2hs, and hence supports several
backend output formats (windows, png, pdf, ps, etc).
I'm announcing
stevelihn wrote:
In my brief experience with Ocaml's GODI, GODI has a way to specify
them in a so-called config package. The install package then reads
what it needs from the config package. In perl's CPAN shell, you can
specify them in the cpan config file (to some extent).
I suggest
I've just uploaded to hackage a step-based music sequencer, called
hbeat. It's little more than a toy, but it's fun. It ought to be
cross platform, though has been built and tested solely on linux.
Given that it's only 400 or so lines, it may be a useful example for
anyone wanting to
I'm using a control structure that's a variation of a monad and I'm
interested in whether
- it's got a name
- it deserves a name (!)
- anything else similar is used elsewhere
Please excuse the longer post...
I have two programs that need to interact with the outside world, and
I
Andrew Coppin wrote:
Such a GUI would be cool for a number of projects. It still needs to
exist first. ;-)
I don't think anyone has mentioned this:
http://haskell.org/Blobs
which I haven't used, though the screenshots look good.
___
Haskell-Cafe
Duncan Coutts wrote:
Tim Docker wrote:
Is it actually reasonable to expect any cabal packages that depend
on
external c libraries and headers to build out of the box on windows?
How can cabal find out where those files are, without requiring a
config file to be edited?
It's usually
Well I'd say none of the packages I've tried, build out of the box...
I'm not a windows developer, but
Is it actually reasonable to expect any cabal packages that depend on
external c libraries and headers to build out of the box on windows? How
can cabal find out where those files are,
droundy:
Chart has rather a complicated API. I've written a simpler API (but
somewhat less flexible), if anyone's interested (Tim wasn't). My API is
closer in complexity (of use) to matlab's plotting.
I'd describe the API as verbose rather than complicated. It takes 5-10
lines of haskell to
don:
jon:
I'd like some free software to help me plot charts like the one from the
ray tracer language comparison:
A quick search of hackage.haskell.org,
http://dockerz.net/twd/HaskellCharts
I need to update the package to build under ghc-6.8.1, though I think it's
just a change to
levi.stephen wrote:
I have similar questions about Haskell abstracting away
implementations behind interfaces as well. I have become
used to an approach where I will not worry about
databases/persistence when beginning. I will create an
interface to a database layer (e.g., save(object),
levi.stephen wrote:
My concern (which may be inexperience ;) ) is with the monads here
though. What if I hadn't seen that the IO monad (or any other Monad)
was going to be necessary in the type signatures?
You'd have some refactoring to do :-) But actually, it's not possible
to create an
I can confirm that ghc-6.8.1 builds from source completely without fuss
on the latest ubuntu (7.10).
(... though it took a couple of hours of cpu time :-)
Tim
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Seth Gordon
Sent: Wednesday, 7 November 2007
Is it possible to use the forkIO primitive to cause pure computations
to be evaluated in parallel threads?
It seems to me that laziness would always prevent any evaluation until
the result was used in a consuming thread (and hence would occur
serially, in that thread).
Tim
-Original
November 2007 11:16 AM
To: Tim Docker
Cc: haskell-cafe@haskell.org; Bulat Ziganshin
Subject: Re: [Haskell-cafe] Go parallel
timd:
Is it possible to use the forkIO primitive to cause pure computations
to be evaluated in parallel threads?
It seems to me that laziness would always prevent any
TJ:
After all, sometimes all you need to know about a list is that
all the elements support a common set of operations. If I'm
implementing a 3d renderer for example, I'd like to have
class Renderable a where
render :: a - RasterImage
scene :: Renderable a = [a]
Everyone has launched
TJ:
Ah... indeed it can, in this case. It won't work if class Renderable
also has a method for saving to file, etc, I suppose, unless scene ::
[(RasterImage,IO (),...whatever other operations...)]
In this case I would generally create a record:
data Renderable = Renderable {
image ::
Andrew Coppin:
As far as I know, all of this is *possible* with Gtk2hs
right now - it's just vastly more complex than making
a single function call. So what I'd like to do is write
a small library which will enable me to do each of the
above tasks in 1 function call. However, I'm getting
don:
The main thing is porting to ghc 6.8 -- which means the new (*faster*)
lazy bytestring representation, and the smp parallel quickcheck driver
for the testsuite (it'll use N cores, watch the jobs migrate around).
Great news... Thanks for the collective work on this. I'm looking
forward to
Pivotal was/is Vital's successor:
http://www.cs.kent.ac.uk/projects/pivotal/
However, it's not clear from the website how alive the project is. I'd
love to see a robust implementation of something like this.
Tim
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Now I wonder what that 7MB file might be? :-)
We (team TNT) implemented KMP over lazy bytestrings as part of our icfp
2007 contest entry. As I remember, for the DNA evaluator it gave modest
speed improvements over more naïve searching. Our implementation was based
upon this blog post:
Alistair Bayley wrote:
I want to interface Takusen with MS Sql Server,
but AFAICT the recommended C API is OLE DB, which
is a COM API.
An alternative would be to write a takusen - freetds binding
(http://www.freetds.org/). This would have the potential benefits of
being
* cross platform
I've put aside the weekend of July 20-23 for the ICFP contest (http://
www.icfpcontest.org/), and am looking to form or join a haskell
wielding team. Any interest? Geographically I'm in Sydney, but have
entered in a previous year with a team of 3 from around the globe
which worked fine.
: Tuesday, 22 May 2007 10:11 PM
To: Tim Docker
Cc: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] type class question
On Tue, 22 May 2007, Tim Docker wrote:
I think this must almost be a FAQ, or at least a PAQ (Previously
AQ)...
I think it too, thus I added your case to the Wiki:
http
I think this must almost be a FAQ, or at least a PAQ (Previously AQ)...
If I have a type class for conversion to a type X:
class XType a where
toX :: a - X
I can define instances for
instance XType Int where toX = ...
instance XType Double where toX = ...
Derek Elkins wrote:
I believe there is a trick where essentially you end up with, instance
IsChar a = XType [a] where ...
That is simple enough, and works fine. Thanks!
Tim
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
The pivotal project:
http://www.cs.kent.ac.uk/projects/pivotal/
is more or less what you are referring to (ie an interactive environment
where haskell is the evaluation language), though it doesn't have the
exact GUI of a spreadsheet.
Tim
From: [EMAIL
There are also equivalent libraries (for producing xls files without
excel) for
python: http://sourceforge.net/projects/pyexcelerator
http://sourceforge.net/projects/pyxlwriter/
perl: http://search.cpan.org/dist/Spreadsheet-WriteExcel/
so you don't have to use java...
Tim
-Original
Chirs Witte wrote:
Are there any good libraries for drawing plots (2D and 3D) in Haskell
(under Windows using GHC)?
Dons has already mentioned my charting library:
http://dockerz.net/software/chart.html
This is 2D only for now. good depends your perspective :-) It is
(intended to be)
Steve Downey wrote:
interesting. it leads to something that feels much more like an object
based, as opposed to a class based, system.
as far as haskell is concerned, everything has the same type, even
though different instances have very different behavior.
the question is, which plays
Steve Downey wrote:
So, I've been working on a Composite example. I've used
existential types to have a generic proxy to the base
type, rather than a simple algebraic type, since adding
new leaves to the algebraic type means modifying the whole
type, a violation of the Open-Closed
Alexy Khabrov wrote:
I wonder if that's another reason OCaml is used in a(t least one)
hedge fund -- why Jane St. preferred OCaml to Haskell, I wonder?
Was
it the state of affairs then that OCaml was more efficient (? --
WAGuess), and would they prefer Haskell now?
Ocaml definitely
afaik, there are just two good enough libs - wxHaskell and GtkHs. can
anyone point (or write) detailed comparison of their features?
One point in wxHaskell's favour is that it supports Mac OS X directly. At
present, to the best of my knowledge, you can only run GtkHs applications
on OS X using
On Jul 12, 2006, at 9:18 PM, Joel Reymont wrote:
Are cool kids supposed to put the comma in front like this?
, foo
, bar
, baz
Is this for historical or other reasons because Emacs formats Haskell
code well enough regardless.
Thanks, Joel
These layouts feel a bit artificial to
I'm making available the current state of my 2D charting library for
haskell. It's still at quite an early stage, but may prove useful. At
present it has:
- line charts, points charts, fills, and combinations.
- Automatic layout sizing and adjustment.
- Auto scaling of axis
Robert Dockins wrote:
All we have to do is be ready for it when it arrives.
When people see that, using Haskell, they can write programs using 1)
fewer man-hours with 2) fewer bugs which 3) scale effortlessly to
highly parallel hardware to beat the pants off C/C++/Java/what-have-
you,
[I've asked this question on lambda-the-ultimate, but it remained unanswered,
and it's probably more appropriate here in any case]
The papers referenced here:
http://lambda-the-ultimate.org/node/view/552
describe a means of projecting values in an implementation
language to and from
Ketil Malde wrote:
(.) . (.) .(.)
I entered it into GHCi, and got
:: forall a a b c a.
(b - c) - (a - a - a - b) - a - a - a - c
I spent a minute or so attempting to intuit the type signature of this,
before cheating and entering it into ghci also.
Keith Wansbrough wrote:
Read the paper _A Semantics for Imprecise Exceptions_. The
problem is that the evaluation order of Haskell would have to
be fixed for this not to lose referential transparency. What
is the value of
catchExcept (show (makeExcept E1 + makeExcept E2))
(\x - x)
Philippa Cowderoy wrote:
The ability to fail doesn't need the do notation, just use of
return for success - similar for propagating failure.
I'm not sure I understand. Do you mean writing functions
like:
sqr x | x 0 = fail less than zero
| otherwise = return (sqrt x)
If
Keith Wansbrough wrote:
s/fail/error/
s/return//
Then you can easily write
I can't (easily) write
text c = sqr x + sqr (x+1)
You just can't *catch* this outside the IO monad.
Of course... that was my second alternative error
strategy. I'm interest in how/when people decide
As a serious programmer, I'd be very happy to have a more graphical,
more interactive programming experience as far as _output_ is concern.
I'm happy to input textual expressions and definitions, but I'd
like instant feedback and display of intermediate results as tables,
graphs, trees, charts
One thing that bugs me about the named record syntax, is that with a datatype:
data T = T {
t_f1 :: X,
t_f2 :: X
};
the function t_f1 has the type of an accessor, ie
t_f1 :: T - X
but there doesn't any tidy way to get at the mutator function
t_f1' :: X - T - T
without
(Apologies for previous incomplete post: Here's the whole thing)
One thing that bugs me about the named record syntax, is that with a datatype:
data T = T {
t_f1 :: X,
t_f2 :: X
};
the function t_f1 has the type of an accessor, ie
t_f1 :: T - X
but there doesn't any tidy way
1 - 100 of 111 matches
Mail list logo