Hi,
Fairly new to Haskell and trying some parsec. (Also, new to
parsers/interpreters)
I had come up with this, which works, but I can't help thinking there's
a better way :)
| newtype Identifier = Identifier String
newtype Literal = StringLiteral String -- to be extended later
data
On Thu, Jun 21, 2007 at 03:34:54PM +0930, Levi Stephen wrote:
Is there a way through combining types/parsers that the double do
block in primary could be avoided?
I understand it's necessary right now because the parsers identifier
and stringLiteral return different types, so I can't just
A while ago I built a Haskell DLL that had to be invoked from Excel.
For some reason (I do not remember exactly why) it did not work directly,
so I wrote a small wrapper DLL in C++ that invoked Haskell functions.
The wrapper DLL was invoked by Excel via COM.
As regards your example, the only
Thanks for the explanation.
But, doesn't this simply mean that the correct signature would be:
serialize :: (Int - Int) - IO String
to take in account the fact that serialise really use 'external' information
that is not in the domain of pure Haskell functions?
Having serialize in the IO
Hi Bulat,
do you mean that as the type information is used only at compilation time and
then thrown away there is no way of getting it back at execution time?
best,
titto
On Wednesday 20 June 2007 16:33:12 Bulat Ziganshin wrote:
Hello Pasqualino,
Wednesday, June 20, 2007, 11:30:32 AM,
Hi Claus,
On Wednesday 20 June 2007 16:41:16 Claus Reinke wrote:
with orthogonal persistence, everything a program touches might
persist, but usually, programs talk about the data being persistet (?),
not about whether that data is currently temporary or in long-term
storage. if you want to
On Thu, 21 Jun 2007, Pasqualino 'Titto' Assini wrote:
Thanks for the explanation.
But, doesn't this simply mean that the correct signature would be:
serialize :: (Int - Int) - IO String
to take in account the fact that serialise really use 'external' information
that is not in the domain of
[mailto:[EMAIL PROTECTED] On Behalf Of Daniel Fischer
I suppose in contrast to the version from HackageDB, which I
got myself on
monday, the darcs version works with ghc = 6.6, or I
probably would have
heard about it. So I'll try to get me that, only where?
On Mon, Jun 18, 2007 at 10:05:40PM +0100, Pasqualino 'Titto' Assini wrote:
Most languages, even Java, have a reflection capability to dynamically
inspect an object.
_Even_ Java? That's a strange point of view considering how much money
went into this technology.
I also find it hard to believe
Hi all,
I read this on the J -programming forum
http://www.jsoftware.com/pipermail/programming/2007-June/007004.html
Maybe of interest, especially the part of generating the subgroup or
composing a more intelligent solver.
quote
I found an interesting game, as found on Andrew Nikitin's
On Thu, Jun 21, 2007 at 10:27:58AM +0200, Tomasz Zielonka wrote:
On Mon, Jun 18, 2007 at 10:05:40PM +0100, Pasqualino 'Titto' Assini wrote:
Most languages, even Java, have a reflection capability to dynamically
inspect an object.
It is surprising that Haskell doesn't offer it.
I'll just
On Thu, 2007-06-21 at 00:20 +0100, Claus Reinke wrote:
in practice, overloading introduces overhead that might hamper
performance.
You mean overloading in general, so using type classes? Is this comparable
to the Java/C#/C++ overhead with virtual methods, so one extra level of
I find it's good for the soul to remember what the do notation is doing for us.
Also I'm with Einstein on You do not really understand something
unless you can explain it to your grandmother :)
Personally I think (in this instance) your three 'Parser a' functions
read nicer as:
primary =
Anatoly Yakovenko wrote:
I don't think the problem with performance of crypto has anything to
do with unpacking ByteStrings. If I unpack the bytestrings first, then
run the hash, and just time the hash algorithm, i still get 4 seconds
with crypto where the C implementation gives me 0.02
[mailto:[EMAIL PROTECTED] On Behalf Of Tomasz Zielonka
On Mon, Jun 18, 2007 at 10:05:40PM +0100, Pasqualino
'Titto' Assini wrote:
Most languages, even Java, have a reflection capability
to dynamically
inspect an object.
It is surprising that Haskell doesn't offer it.
I'll
Hi Tom,
On Thursday 21 June 2007 08:59:42 Tom Schrijvers wrote:
On Thu, 21 Jun 2007, Pasqualino 'Titto' Assini wrote:
Thanks for the explanation.
But, doesn't this simply mean that the correct signature would be:
serialize :: (Int - Int) - IO String
to take in account the fact that
Good idea. I'll improve the message by adding the suggestion to use a case
expression instead.
Simon
| -Original Message-
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Dagit
| Sent: 21 June 2007 00:46
| To: Simon Peyton-Jones
| Cc: Ian Lynagh;
Tom Schrijvers wrote:
On Thu, 21 Jun 2007, Pasqualino 'Titto' Assini wrote:
But, doesn't this simply mean that the correct signature would be:
serialize :: (Int - Int) - IO String
to take in account the fact that serialise really use 'external'
information that is not in the domain of pure
However, after reading all about TH it doesn't seem like there's a way
to do this (reflecting on the current module to pull out the names of
certain top-level declarations).
I don't know template haskell very well yet.
To do introspection there is the function reify which returns
On 6/21/07, Dave Tapley [EMAIL PROTECTED] wrote:
primary = (identifier = (return . PrimaryIdentifier)) | (stringLiteral
= (return . PrimaryLiteral))
identifier = (many1 letter) = (return . Identifier)
stringLiteral = (char '\'') (manyTill anyChar (char '\'')) = (return .
StringLiteral)
I
Hello,
I have this very simple program that executes an external program,
reads its output and prints it (the program is date).
The readings is done with pipes.
The problem is that memory usage constantly increases over time.
Profiling does not show garbage collection of any sort.
File
In odd spare moments, I took John Harrops simple ray tracer[1] made a
Haskell version:
http://www.kantaka.co.uk/cgi-bin/darcsweb.cgi?r=ray
darcs get http://www.kantaka.co.uk/darcs/ray
It's pretty much a straight translation into idiomatic Haskell (as far
as my Haskell is idiomatic anyway).
On 21/06/07, Andrea Rossato [EMAIL PROTECTED] wrote:
runComLoop :: String - IO ()
runComLoop command =
do (r,w) - createPipe
wh - fdToHandle w
hSetBuffering wh LineBuffering
p - runProcess command [] Nothing Nothing Nothing (Just wh) (Just wh)
rh - fdToHandle r
Hello Pasqualino,
Thursday, June 21, 2007, 11:22:19 AM, you wrote:
more or less. there are Data and Typeable classes that provides this
information but to use them you
1) should use GHC
2) should add deriving Typeable clause to declaration of each type
you need to inspect
3) have Typeable a
On Thu, Jun 21, 2007 at 12:25:44PM +0100, Sebastian Sylvan wrote:
Try using floats for the vector, and strict fields (add a ! to the
fields in the data declaration).
Because the optimisation page on the haskell wiki is very explicit
about never using Float when you can use Double, that's why.
On Thu, 2007-06-21 at 01:49 +0200, Daniel Fischer wrote:
It half worked in ghci. Only all evals failed. That gave me a lead and after
a
lot of tinkering with the code of plugins-1.0, I found out one major problem.
As of 6.6, ghc calls all interfaces
interface main:Modulename
and so
Hi,
On Thursday 21 June 2007 09:27:58 Tomasz Zielonka wrote:
I think the reasons are mostly insufficient resources and not enough
interest to justify the effort. I think an interesting lesson about this
comes from the effort that went into Template Haskell (which, BTW,
offers some kind of
On Thu, 21 Jun 2007, Pasqualino 'Titto' Assini wrote:
Hi Tom,
On Thursday 21 June 2007 08:59:42 Tom Schrijvers wrote:
On Thu, 21 Jun 2007, Pasqualino 'Titto' Assini wrote:
Thanks for the explanation.
But, doesn't this simply mean that the correct signature would be:
serialize :: (Int -
On Jun 21, 2007, at 6:40 , Andrea Rossato wrote:
I have this very simple program that executes an external program,
reads its output and prints it (the program is date).
The readings is done with pipes.
The problem is that memory usage constantly increases over time.
Profiling does not show
Is there a good book or web site outlining decent pure-lazy-functional
data structures, with or without code samples?
--
Michael T. Richter [EMAIL PROTECTED] (GoogleTalk:
[EMAIL PROTECTED])
I'm not schooled in the science of human factors, but I suspect surprise
is not an element of a robust
Hello Tomasz,
Thursday, June 21, 2007, 12:27:58 PM, you wrote:
I also find it hard to believe that most languages have reflection,
especially those which are traditionally focused on efficiency and
compilation to native code, like C, C++, Fortran, Pascal, etc.
for OOP languages, it is no
Hello Philip,
Thursday, June 21, 2007, 3:36:27 PM, you wrote:
revision used Float and it was slower than the current one. Making the
datatypes strict also makes no difference.
don't forget to use either -funpack-strict-fields or {#- UNPACK -#} pragma
--
Best regards,
Bulat
Hello Pasqualino,
Thursday, June 21, 2007, 3:55:35 PM, you wrote:
I wonder: would it be possible to use the compile time reflection facilities
of TH to write a 'serialise' function, keeping the TH AST so that it can be
used at run-time?
yes. but you will need to find any functions used in
On 6/21/07, Michael T. Richter [EMAIL PROTECTED] wrote:
Is there a good book or web site outlining decent pure-lazy-functional
data structures, with or without code samples?
Chris Okasaki's publication page is a goldmine when it comes to functional
data structures, lazy and otherwise.
On Thu, Jun 21, 2007 at 04:23:37PM +0400, Bulat Ziganshin wrote:
Thursday, June 21, 2007, 3:36:27 PM, you wrote:
revision used Float and it was slower than the current one. Making the
datatypes strict also makes no difference.
don't forget to use either -funpack-strict-fields or {#- UNPACK
Awesome stuff!
On Thursday 21 June 2007 12:36:27 Philip Armstrong wrote:
On Thu, Jun 21, 2007 at 12:25:44PM +0100, Sebastian Sylvan wrote:
Try using floats for the vector, and strict fields (add a ! to the
fields in the data declaration).
Because the optimisation page on the haskell wiki is
Hi,
I'm making my way through Haskell which seems to me one of the languages
with steepest learning curve around.
Now, please consider this snippet:
{-# OPTIONS_GHC -fglasgow-exts #-}
module Main where
class FooOp a b where
foo :: a - b - IO ()
instance FooOp Int Double where
foo x y =
Thomas Conway wrote:
p `with` f = p = (return . f)
so I can write
primary = (identifier `with` PrimaryIdentifier) | (stringLiteral
`with` PrimaryLiteral)
I would write
primary = PrimaryIdentifier `fmap` identifer
| PrimaryLiteral`fmap` stringLiteral
(I prefer fmap to liftM but
On Thu, Jun 21, 2007 at 08:18:23AM -0400, Brandon S. Allbery KF8NH wrote:
On Jun 21, 2007, at 6:40 , Andrea Rossato wrote:
I have this very simple program that executes an external program,
reads its output and prints it (the program is date).
The readings is done with pipes.
The
On Thu, Jun 21, 2007 at 01:39:24PM +0100, Jon Harrop wrote:
Awesome stuff!
On Thursday 21 June 2007 12:36:27 Philip Armstrong wrote:
On Thu, Jun 21, 2007 at 12:25:44PM +0100, Sebastian Sylvan wrote:
Try using floats for the vector, and strict fields (add a ! to the
fields in the data
On Thu, Jun 21, 2007 at 10:51:25AM +0100, Simon Peyton-Jones wrote:
Good idea. I'll improve the message by adding the suggestion to use a
case expression instead.
Or do notation. I almost always prefer do notation, even if it means
something like:
fromJust $ do a' : b' - commute (b : a)
Hello Cristiano,
Thursday, June 21, 2007, 4:46:27 PM, you wrote:
class FooOp a b where
foo :: a - b - IO ()
instance FooOp Int Double where
foo x y = putStrLn $ (show x) ++ Double ++ (show y)
this is rather typical question :) unlike C++ which resolves any
overloading at COMPILE
Levi Stephen wrote:
newtype Identifier = Identifier String
newtype Literal = StringLiteral String -- to be extended later
data Primary = PrimaryLiteral Literal | PrimaryIdentifier Identifier
primary = do {
i - identifier;
return $ PrimaryIdentifier i; }
| do {
l -
Tom Schrijvers wrote:
I understand that, depending on what the compiler does the result of :
do
let f = (*) 2
print $ serialise f
might differ as, for example, the compiler might have rewritten f as
\n -
n+n.
But, why would that make equational reasoning on serialise not valid?
Tom Schrijvers wrote:
I understand that, depending on what the compiler does the result of :
do
let f = (*) 2
print $ serialise f
might differ as, for example, the compiler might have rewritten f as
\n -
n+n.
But, why would that make equational reasoning on serialise not valid?
Isn't
Ah -
The state of the world serialized into your representation.
That would be interesting to see
Neil
... ah you meant something different?
On 21/06/07, apfelmus [EMAIL PROTECTED] wrote:
Tom Schrijvers wrote:
I understand that, depending on what the compiler does the result of
Hello,
I am using ghc 6.6. I am using the formatTime function from Data.Time.Format.
The docs say that the %Q format string gives: decimal point and up to
12 second decimals, without trailing zeros.
But I always just get an empty string. Here is what happens when I try
using ghci:
now -
I was able to figure out how to get the example in chapter 11 of the GHC
manual to work. Since it was not intuitive (to a non C programmer), I
thought that I should post this so that others might take advantage of it.
KEYWORDS: Foreign, Export, Win32, DLL, VBA, Excel, GCH, Example
The contents
On Thursday 21 June 2007, Tom Schrijvers wrote:
That wouldn't make a difference. If, from the pure Haskell point of view
we can't tell the difference between two expressions that denote the same
function, then operations in the IO monad should not be able to do so
either.
This doesn't make
On 6/21/07, Cristiano Paris [EMAIL PROTECTED] wrote:
Hi,
I'm making my way through Haskell which seems to me one of the languages
with steepest learning curve around.
Now, please consider this snippet:
{-# OPTIONS_GHC -fglasgow-exts #-}
module Main where
class FooOp a b where
foo :: a - b
On Thursday 21 June 2007, Tom Schrijvers wrote:
That wouldn't make a difference. If, from the pure Haskell point of view
we can't tell the difference between two expressions that denote the same
function, then operations in the IO monad should not be able to do so
either.
This doesn't make
Hi Bulat,
I was thinking of something like this (warning: I have never used TH before):
{-# OPTIONS -fth #-}
module SerialiseTest where
import Language.Haskell.TH
We have an application whose state is a function Int-Int.
We want to be able to serialise this state so that, for example, we
Bulat Ziganshin wrote:
Hello Cristiano,
Thursday, June 21, 2007, 4:46:27 PM, you wrote:
class FooOp a b where
foo :: a - b - IO ()
instance FooOp Int Double where
foo x y = putStrLn $ (show x) ++ Double ++ (show y)
this is rather typical question :) unlike C++ which resolves any
Hello Pasqualino,
Thursday, June 21, 2007, 7:35:47 PM, you wrote:
So, the state is both applicable and serialisable (on the receiving side we
should naturally have an interpreter for the TH representation).
and this interpreter should have a way to find function definition by
its name - it's
Hello Dan,
Thursday, June 21, 2007, 7:39:35 PM, you wrote:
class FooOp a b where
foo :: a - b - IO ()
instance FooOp Int Double where
foo x y = putStrLn $ (show x) ++ Double ++ (show y)
this is rather typical question :) unlike C++ which resolves any
overloading at COMPILE
Hi Bulat,
the receiving side has the option of either interpreting the TH representation
or, as you suggested, to just dynamically compile its Haskell source
equivalent (as produced by TH's pprint) using GHC API or hs-plugins.
Probably not very efficient but quite easy to implement,
Best,
Is f(~p(x))=e(x) semantically equivalent to: f(z)=e(x) where p(x)=z?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Thu, Jun 21, 2007 at 06:13:22PM +0200, Peter Padawitz wrote:
Is f(~p(x))=e(x) semantically equivalent to: f(z)=e(x) where p(x)=z?
Yes.
PS: I saw that twice
Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Thu, Jun 21, 2007 at 09:18:02AM -0700, Stefan O'Rear wrote:
PS: I saw that twice
Oops, failed to notice the cross-post - I thought it was a double post,
sorry. In the future smallish questions should usually be directed to
-cafe@ - haskell@ is treated as an announce list.
Stefan
Hello Pasqualino,
Thursday, June 21, 2007, 8:10:30 PM, you wrote:
how it can interpret call to foo without loading it? :)
the receiving side has the option of either interpreting the TH representation
or, as you suggested, to just dynamically compile its Haskell source
equivalent (as
Hi Bulat,
On Thursday 21 June 2007 17:29:13 Bulat Ziganshin wrote:
how it can interpret call to foo without loading it? :)
I am not sure if I understand what you mean.
It certainly does load it.
Calling hspugins eval (or compiling with GHC API) will cause 'AModule.foo
to be loaded and
Tom Schrijvers wrote:
On Thursday 21 June 2007, Tom Schrijvers wrote:
That wouldn't make a difference. If, from the pure Haskell point of view
we can't tell the difference between two expressions that denote the
same function, then operations in the IO monad should not be able to do so
Andrea Rossato wrote:
Now I'm going to profile for memory usage: I've seen that some GC
happens if you are patient enough.
Yes, the process will hit a steady state of a few megabytes of heap
after a short time.
By the way, your program leaks ProcessHandles.
b
On Thu, 2007-06-21 at 13:39 +0100, Jon Harrop wrote:
Awesome stuff!
On Thursday 21 June 2007 12:36:27 Philip Armstrong wrote:
On Thu, Jun 21, 2007 at 12:25:44PM +0100, Sebastian Sylvan wrote:
Try using floats for the vector, and strict fields (add a ! to the
fields in the data
On Thu, 2007-06-21 at 20:21 +0800, Michael T. Richter wrote:
Is there a good book or web site outlining decent pure-lazy-functional
data structures, with or without code samples?
http://www.google.com/search?q=purely+functional+data+structures
___
Darrell,
Would you be willing to put your step by step instructions on the
wiki? I think having them on the wiki would benefit the largest
audience.
Thanks!
Jason
On 6/21/07, Lewis-Sandy, Darrell [EMAIL PROTECTED] wrote:
Whoops - I posted the wrong version of the exports list. Compilation
Hello Pasqualino,
Thursday, June 21, 2007, 8:43:20 PM, you wrote:
how it can interpret call to foo without loading it? :)
What am I missing?
i mean that there are no either .. or .. alternatives as you said -
we can't interpret AST without function bindings
--
Best regards,
Bulat
Philip Armstrong [EMAIL PROTECTED] writes:
(snip)
Because the optimisation page on the haskell wiki is very explicit
about never using Float when you can use Double, that's why.
(snip)
Is that still true if you use -fexcess-precision ?
-- Mark
___
Cristiano Paris wrote:
class FooOp a b where
foo :: a - b - IO ()
instance FooOp Int Double where
foo x y = putStrLn $ (show x) ++ Double ++ (show y)
partialFoo = foo (10::Int)
bar = partialFoo (5.0::Double)
The Haskell type classes system works in an open world assumption:
while the
On Thu, Jun 21, 2007 at 04:37:20PM +0200, Tom Schrijvers wrote:
That wouldn't make a difference. If, from the pure Haskell point of view
we can't tell the difference between two expressions that denote the same
function, then operations in the IO monad should not be able to do so
either.
So float math in *slower* than double math in Haskell? That is interesting.
Why is that?
BTW, does Haskell support 80-bit long doubles? The Intel CPU seems to use
that format internally.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Philip
On Thu, Jun 21, 2007 at 01:29:56PM -0400, Mark T.B. Carroll wrote:
Philip Armstrong [EMAIL PROTECTED] writes:
(snip)
Because the optimisation page on the haskell wiki is very explicit
about never using Float when you can use Double, that's why.
(snip)
Is that still true if you use
On Thu, Jun 21, 2007 at 08:15:36PM +0200, peterv wrote:
So float math in *slower* than double math in Haskell? That is interesting.
Why is that?
BTW, does Haskell support 80-bit long doubles? The Intel CPU seems to use
that format internally.
As I understand things, that is the effect of
Alright, I've been hacking away at what I posted the other day, and I
have something that works for files that will fit entirely into memory.
And then I figured out why I've been restricted to files that fit
entirely into memory... One of my functions is causing the entire thing
to be read in,
The (BS.length f) can only be computed by reading until the end of the file!
breakIntoDocuments :: RawDocument - [RawDocument]
breakIntoDocuments f | BS.length f 0 = if len 0
then (BS.take bytes f) :
Philip Armstrong [EMAIL PROTECTED] writes:
(snip)
Why on earth would you use -fexcess-precision if you're using Floats?
The excess precision only apples to Doubles held in registers on x86
IIRC. (If you spill a Double from a register to memory, then you lose
the extra precision bits in the
Peter Padawitz writes:
Is f(~p(x))=e(x) semantically equivalent to: f(z)=e(x) where p(x)=z?
Yep.
See also http://en.wikibooks.org/wiki/Haskell/Laziness#Lazy_pattern_matching
regarding lazy patterns.
--
-David House, [EMAIL PROTECTED]
___
Tillmann Rendel wrote:
Andrew Coppin wrote:
[...] type (a,b) [...]
That's a rather special type; I haven't seen anything remotely like
it in any other language.
This type isn't that special in Haskell (apart from being
syntax-sugared), it could be defined as
data Pair a b = Pair a b
public class PairA, B {
public A fst;
public B snd;
public Pair(A fst, B snd) {
this.fst = fst;
this.snd = snd;
}
}
OK, I don't even understand that syntax. Have they changed the Java
language spec or something?
Yes. As of version 5 (or 1.5, or whatever you want to
Brent Yorgey wrote:
OK, I don't even understand that syntax. Have they changed the Java
language spec or something?
Yes. As of version 5 (or 1.5, or whatever you want to call it), Java
has parametric polymorphism. Do a Google search for Java generics.
OMG - they actually added
Greetings.
Is there a standard library function anywhere which will parse a string
into some kind of date/time representation? And, further, is there some
function that will tell me how many seconds elapsed between two such times?
(I see there's a giant pile of modules to do with dates and
OK, a few questions...
1. Is there *any* way to determine how large a file is *without* opening
it? The only library function I can find to do with file sizes is
hFileSize; obviously this only works for files that you have permission
to open!
2. Is there any way to discover Windoze-style
On Thu, Jun 21, 2007 at 09:19:51PM +0100, Andrew Coppin wrote:
OK, a few questions...
1. Is there *any* way to determine how large a file is *without* opening it?
The only library function I can find to do with file sizes is hFileSize;
obviously this only works for files that you have
Andrea Rossato wrote:
On Thu, Jun 21, 2007 at 09:19:51PM +0100, Andrew Coppin wrote:
OK, a few questions...
1. Is there *any* way to determine how large a file is *without* opening it?
The only library function I can find to do with file sizes is hFileSize;
obviously this only works
Andrea Rossato wrote:
Still I do not understand you reference to the leak problem. Could you
please elaborate a bit?
The runProcess function returns a ProcessHandle. If you don't call
waitForProcess on that handle, you'll leak those handles. On Unix-like
systems, this means you'll
On Thu, Jun 21, 2007 at 09:38:49PM +0100, Andrew Coppin wrote:
Andrea Rossato wrote:
On Thu, Jun 21, 2007 at 09:19:51PM +0100, Andrew Coppin wrote:
2. Is there any way to discover Windoze-style attributes for files?
The module before, if I understand correctlu.
No, AFAIK the
Andrew Coppin wrote:
Dan Piponi wrote:
On 6/20/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Yes... graph and network are virtually synonymous. I'm still
wondering what you'd use a network for in a computer program.
Writing a Haskell compiler.
True enough - but that's a rather specific task.
On Thu, Jun 21, 2007 at 01:36:16PM -0700, Bryan O'Sullivan wrote:
Andrea Rossato wrote:
Still I do not understand you reference to the leak problem. Could you
please elaborate a bit?
The runProcess function returns a ProcessHandle. If you don't call
waitForProcess on that handle,
On 6/21/07, Andrew Coppin [EMAIL PROTECTED] wrote:
Is there a standard library function anywhere which will parse a string
into some kind of date/time representation?
In Data.Time.Format, there's parseTime. parseTime takes a format string that
describes the layout. Since you have varying
I don't use Haskell on Windows, but if you go to
http://www.haskell.org/ghc/docs/latest/html/libraries/index.html
you'll find a package called System.Win32.File, which has these functions:
*getFileAttributes* ::
Andrew Coppin wrote:
I don't even understand that... :-S
Ok, I'll try to explain it:
I represent sets by their characteristic function, wich returns True for
members of the set, and False for other values.
type Set a = a - Bool
For example, the set of numbers containing only 42 is
On Thu, Jun 21, 2007 at 09:15:12PM +0100, Andrew Coppin wrote:
Greetings.
Is there a standard library function anywhere which will parse a string
into some kind of date/time representation? And, further, is there some
function that will tell me how many seconds elapsed between two such
You should be using BS.null f rather than BS.length f 0.
--
Jedaï
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
with orthogonal persistence, everything a program touches might
persist, but usually, programs talk about the data being persistet (?),
not about whether that data is currently temporary or in long-term
storage. if you want to move such data between processes or storage
areas, you move the
On 6/20/07, apfelmus [EMAIL PROTECTED] wrote:
Eh, why not a simple mergesort that also deletes duplicates?
I had to sit down and think about this, and while for the simple case
that I showed, your equivalent code is definitely simpler, and
probably more efficient.
The actual case that I'm
Tillmann Rendel wrote:
My self-defined monadic combinator of choice to use with parsec is
a ~ b = a = \x - b return x
It works like (), but returns the result of the first instead of the
result of the second computation. It is kind of an alternative for
between:
between lparen rparen
On 6/21/07, Andrew Coppin [EMAIL PROTECTED] wrote:
OK, a few questions...
1. Is there *any* way to determine how large a file is *without* opening
it? The only library function I can find to do with file sizes is
hFileSize; obviously this only works for files that you have permission
to open!
On Thu, 2007-06-21 at 08:14 +0400, Bulat Ziganshin wrote:
Hello Duncan,
Thursday, June 21, 2007, 7:36:13 AM, you wrote:
The smallest possible would be 2 words overhead by just using a
ByteArray#,
i tried it once and found that ByteArray# size is returned rounded to 4 -
there is no
On Fri, 2007-06-22 at 09:38 +1000, Thomas Conway wrote:
The actual case that I'm dealing with, where I believe Data.Map (or
similar, incl finger trees) has a benefit is one in which it's not
simply a case of lists of items, yielding a list of items. I'm
manipulating an on-disk inverted index,
Has anyone built a library providing an interface to WMI (Windows
Management Instrumentation) in Haskell?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
1 - 100 of 101 matches
Mail list logo