find_the_day sDay 0 = sDay
find_the_day sDay nDay =
if (is_trade_day $ nextDay sDay)
then find_the_day (nextDay sDay) (nDay - 1)
else find_the_day (nextDay sDay) nDay
nextDay sDay = addDays 1 sDay
The above code works fine. But the following always reports `compiling
error`:
find_t
Odd. Looks like most of the packages on d.h.o evaporated. I'll push the
repo to a new location. - Conal
On Sat, Jan 23, 2010 at 10:38 AM, Thomas Hartman wrote:
> I was inspired by the google tech talk and would like to install and
> play with eros, but the
>
> http://darcs.haskell.org/packag
I don't like this bias toward singling out Monad among all of the type
classes, thereby perpetuating the misleading mystique surrounding Monad. If
you're going to call [3,5,8] "a monadic value", then please give equal time
to other type classes by also calling [3,5,8] "a functorial value"
("functo
I call it "an m" or (more specifically) "an Int m" or "a list of Int". For
instance, "a list" or "an Int list" or "a list of Int". - Conal
On Wed, Jan 27, 2010 at 12:14 PM, Luke Palmer wrote:
> On Wed, Jan 27, 2010 at 11:39 AM, Jochem Berndsen
> wrote:
> >> Now, here's the question: Is is cor
Am Freitag 29 Januar 2010 23:26:28 schrieb Matthieu Sozeau:
> Le 29 janv. 10 à 02:56, o...@okmij.org a écrit :
> > Here is a bit more simplified version of the example. The example has
> > no value level recursion and no overt recursive types, and no
> > impredicative
> > polymorphism. The key is t
On Friday 29 January 2010 5:26:28 pm Matthieu Sozeau wrote:
> data R (c :: *) where
>R :: forall c' :: * -> *, (c' (c' ()) -> False) -> R (c' ()).
This is what the data declaration is. The c on the first line and the c on the
second line are unrelated. It's sort of an oddity of GADT declarati
Le 29 janv. 10 à 02:56, o...@okmij.org a écrit :
Here is a bit more simplified version of the example. The example has
no value level recursion and no overt recursive types, and no
impredicative
polymorphism. The key is the observation, made earlier, that two types
c (c ()) and R (c
Am Freitag 29 Januar 2010 22:38:11 schrieb Han Joosten:
> knyttr wrote:
> fun x [] [] = ...
> fun x y [] = ...
> fun x y z = ...
> would make more sence.
>
> however, there still is overlap. (ghc could generate a warning for
> this)
>
> now the where part: there are several options:
>
> fun x y
knyttr wrote:
>
> 1. suppose I have a function like this
>
> fun x y z = ...
> fun x y [] = ...
> fun x [] [] = ...
> where
> ...
>
> the "where" term will be applied just to the last definition. is it
> possible to force it to all "fun" definitions?
>
The last two parts of your definit
Maurício CA wrote:
> Hi, all,
>
> Sorry if this looks weird, but do you know of experiences with
> functional programming, or "type programming", with C? Using macro
> tricks or just good specifications?
I know there is some type level programming (not strictly functional)
in CCAN:
http://
Tanks for replying.
I now see what went wrong:
I went to http://www.haskell.org/cabal/release/cabal-install-0.8.0/
http://www.haskell.org/cabal/release/cabal-install-0.8.0/ , because I had
read that I needed the 0.8.0 version. I read the page, and grabbed the
cabal.exe binary, assuming that i
On Fri, Jan 29, 2010 at 8:56 AM, wrote:
>
> Here is a bit more simplified version of the example. The example has
> no value level recursion and no overt recursive types, and no impredicative
> polymorphism. The key is the observation, made earlier, that two types
>c (c ()) and R (c ())
>
'FindBin' is also useful.
http://hackage.haskell.org/package/FindBin
While System.Directory is quite useful, it doesn't contain a function
to obtain
the directory in which the running program lives. You can get the
current
(working) directory (e.g. unix's 'getpwd'), and you can try to find
On Fri, Jan 29, 2010 at 11:45 AM, Andrew Coppin
wrote:
> But now suppose that I want not just circles, but *anything* that can
> possibly be reduced to line segments.
If all you know about it is that it can be reduced to line segments,
there is no loss of generality in representing that simply as
Am Freitag 29 Januar 2010 19:36:12 schrieb Han Joosten:
> I recently upgraded to GHC 6.12.1 on my windows system.
> Now I have trouble getting cabal right.
> I read the forums, and I got the cabal.exe for windows. I think I
> followed the upgrade instructions. However I do not get it all to work.
>
Edward Kmett wrote:
Luke pretty much nailed the summary of what you can parse using
Applicative means. I tend to consider them "codata CFGs", because they
can have infinite breadth and depth. However, a 'codata CFG' can
handle a much larger class of languages than CFGs.
Aren't CFGs banned in
Hi,
Try a:
> cabal update
> cabal install cabal-install
That will set you up with a newer version of Cabal, that should be GHC
6.12 compatible. Make sure you do all this while GHC 6.10 is on the
path, so it knows how to install cabal-install.
Thanks, Neil
On Fri, Jan 29, 2010 at 6:36 PM, Han
Luke Palmer wrote:
On Thu, Jan 28, 2010 at 12:42 PM, Andrew Coppin
wrote:
I wonder if you can make a parser combinator library which is *not* monadic?
And, if you could, in what way would that limit the kinds of things you can
parse?
Absolutely! I believe both Applicatives and Arrows
I recently upgraded to GHC 6.12.1 on my windows system.
Now I have trouble getting cabal right.
I read the forums, and I got the cabal.exe for windows. I think I followed
the upgrade instructions. However I do not get it all to work. THis is my
version of Cabal:
C:>cabal --version
cabal-in
On 2010-01-29 01:09, Edward Kmett wrote:
Luke pretty much nailed the summary of what you can parse using Applicative
means. I tend to consider them "codata CFGs", because they can have infinite
breadth and depth. However, a 'codata CFG' can handle a much larger class of
languages than CFGs. To th
2010/1/29 Dennis Walter :
> Hi all,
>
> I wonder if it is possible to have Haddock include the date and time
> at which the documentation was generated. Ideally this should only
> occur on index.html, but to have it in any file (e.g. in the footer)
> would be OK, too. I couldn't find any informatio
Hi, all,
Sorry if this looks weird, but do you know of experiences with
functional programming, or "type programming", with C? Using macro
tricks or just good specifications?
I know this is not absurd to a small extent. I've heard of proof
tool certificated C code on the net (although I don't un
http://downforeveryoneorjustme.com/community.haskell.org/
Thanks, Neil
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Fri, Jan 29, 2010 at 1:09 AM, zaxis wrote:
>
> `cabal install regex-compat` fixes my problem. thanks!
>
For what it's worth, according to the documentation the "-compat" package is
for easing a transition in the api (which has now been completed). You may
want to "upgrade" to a different pa
Cool, Thanks :D
also quickcheck says the two algorithms are equivalent :)
On Fri, Jan 29, 2010 at 4:33 AM, Nick Smallbone wrote:
> Job Vranish writes:
>
> > Ideally we'd like the type of convert to be something like:
> > convert :: LambdaExpr -> SKIExpr
> > but this breaks in several places,
2010/1/26 Dan Mead :
> Hey all
>
> Can anyone recommend a good textbook on computer vision or image processing?
>
> I don't care if it favors Haskell or not, I'm just trying to find a good text.
We used Digital Image Processing, Gonzales & Woods
http://www.amazon.com/Digital-Image-Processing-Rafae
On 29 Jan 2010, at 15:57, John Lato wrote:
That looks interesting too. Yet another idea: use arrays
http://haskell.org/haskellwiki/Arrays
Then build a hash table, say just taking mod k n, and have values
in some
lookup map. If n > set of keys, average time complexity is O(1),
and arrays
sh
On Fri, Jan 29, 2010 at 12:46 PM, Hans Aberg wrote:
> On 29 Jan 2010, at 12:52, John Lato wrote:
>
>>> There are minimal perfect hash functions; there are some libraries
>>> mentioned here, though they are not in Haskell code:
>>> http://en.wikipedia.org/wiki/Perfect_hash_function
>>>
>>> This is
On 29 Jan 2010, at 12:52, John Lato wrote:
There are minimal perfect hash functions; there are some libraries
mentioned here, though they are not in Haskell code:
http://en.wikipedia.org/wiki/Perfect_hash_function
This is suitable when you do a lot of lookups with few key updates.
An
alter
Hi all,
I wonder if it is possible to have Haddock include the date and time
at which the documentation was generated. Ideally this should only
occur on index.html, but to have it in any file (e.g. in the footer)
would be OK, too. I couldn't find any information about dates in the
documentation.
On Friday 29 January 2010 2:56:31 am o...@okmij.org wrote:
> Here is a bit more simplified version of the example. The example has
> no value level recursion and no overt recursive types, and no impredicative
> polymorphism. The key is the observation, made earlier, that two types
> c (c ())
I've made a few more changes to WAI since my last update. Namely, request
and response headers are now their own datatype. As with Method, HttpVersion
and Status, they both provide constructors for "everything else" and have
functions to convert to/from bytestrings. This makes the package a bit mor
> From: Hans Aberg
>
> On 28 Jan 2010, at 20:07, Steve Schafer wrote:
>
>> The data are currently in a large lookup table. To save space, I'd
>> like
>> to convert that into a sort of hash function:
>>
>> hash :: key -> value
>>
>> My question is this: Is there any kind of generic approach that ca
> From: haskell-cafe-boun...@haskell.org
> [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Günther Schmidt
>
> I need to use MS Access as a DB-backend. To make it not too
> easy there
> are tables with Umlaut Strings in some of the columns.
>
> And Takusen crashes outright.
Can you try
On Thu, 28 Jan 2010 18:32:02 -0800, Ryan Ingram wrote:
> But your example uses a recursive type; the interesting bit about this
> example is that there is no recursive types or function, and yet we
> can encode this loop.
The point is that you get the Fix type by (infintely) unfolding the
type de
Job Vranish writes:
> Ideally we'd like the type of convert to be something like:
> convert :: LambdaExpr -> SKIExpr
> but this breaks in several places, such as the nested converts in the RHS of
> the rule:
> convert (Lambda x (Lambda y e)) | occursFree x e = convert (Lambda x (convert
> (Lamb
`cabal install regex-compat` fixes my problem. thanks!
Lee Houghton-3 wrote:
>
> On 29/01/2010 03:51, zaxis wrote:
>>
>> import Text.Regex
>>
>> date_by_ntday dateStr ntday = do
>> let [y,m,d] = map (\x -> read x::Int) $ splitRegex (mkRegex "-")
>> dateStr
>>
>>
>> %ghc --versi
37 matches
Mail list logo