Re: [Haskell-cafe] deriving Data.HashTable - stack overflow

2013-08-09 Thread Lyle Kopnicky
Ah, thanks, folks! I'll just implement my own hashing by generating a string and calling the hash function on that. That's what I was doing in the old version of my code, anyway. It's just that in the core Data.HashTable, you had to provide a hash function, so the point where I used the hash

Re: [Haskell-cafe] deriving Data.HashTable - stack overflow

2013-08-09 Thread Lyle Kopnicky
I chose not to introduce another dependency. I just implemented the hash function by delegating to the Show instance of the nested type: data ValType = FloatType | IntType | StringType deriving (Show,Eq) data VarName = VarName ValType String deriving (Show,Eq) instance Hashable VarName

Re: [Haskell-cafe] deriving Data.HashTable - stack overflow

2013-08-09 Thread Lyle Kopnicky
Here's another way to do it: data ValType = FloatType | IntType | StringType deriving (Show,Eq) instance Hashable ValType where hash FloatType = 0 hash IntType = 1 hash StringType = 2 data VarName = VarName ValType String deriving (Show,Eq) instance Hashable VarName where

[Haskell-cafe] deriving Data.HashTable - stack overflow

2013-08-08 Thread Lyle Kopnicky
Hi folks, In GHC 7.6.3, the base Data.HashTable is deprecated, so I installed the hashtables package. In order to work on your datatype, you need an instance of Data.Hashable.Hashable. So I went to the Data.Hashable page and looked up examples on how to derive a Hashable instance for my

[Haskell-cafe] Unable to install Haskell Platform without readline

2009-09-11 Thread Lyle Kopnicky
Hi folks, I just installed GHC 6.10.4 on Ubuntu 9.04 32-bit, and then tried to install the Haskell Platform from source. It built quite a bit of stuff, with many warnings but no errors, and then finally died with the error below. To install editline, I need cabal, which is of course why I

[Haskell-cafe] Re: Unable to install Haskell Platform without editline

2009-09-11 Thread Lyle Kopnicky
I mean editline, not readline. On Fri, Sep 11, 2009 at 11:46 AM, Lyle Kopnicky li...@qseep.net wrote: Hi folks, I just installed GHC 6.10.4 on Ubuntu 9.04 32-bit, and then tried to install the Haskell Platform from source. It built quite a bit of stuff, with many warnings but no errors

Re: [Haskell-cafe] Unable to install Haskell Platform without editline

2009-09-11 Thread Lyle Kopnicky
On Fri, Sep 11, 2009 at 12:01 PM, Judah Jacobson judah.jacob...@gmail.comwrote: The above editline requirement is for the editline C library, not the Haskell bindings: http://www.thrysoee.dk/editline My guess is that you need to install a recent version of the libedit-dev package. After

[Haskell-cafe] Haskell Platform install fails on mtl

2009-09-11 Thread Lyle Kopnicky
OK, I was able to build the Haskell Platform on Ubuntu 9.04 with GHC 6.10.4. But when I try to install it, I get an error: Registering haskell-platform-2009.2.0.2... Reading package info from dist/inplace-pkg-config ... done. Writing new package config file... done.

[Haskell-cafe] Re: Haskell Platform install fails on mtl

2009-09-11 Thread Lyle Kopnicky
}... install_pkg ${pkg} cd .. fi On Fri, Sep 11, 2009 at 1:04 PM, Lyle Kopnicky li...@qseep.net wrote: OK, I was able to build the Haskell Platform on Ubuntu 9.04 with GHC 6.10.4. But when I try to install it, I get an error: Registering haskell-platform-2009.2.0.2... Reading package info from

[Haskell-cafe] Build 32-bit apps on 64-bit Windows?

2009-07-14 Thread Lyle Kopnicky
If I am running GHC on 64-bit Windows, do I have a choice of building a 32-bit or 64-bit app? On a cursory glance through the command-line options, I didn't find anything. - Lyle ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell] The speed, size and dependability of programming languages

2009-06-02 Thread Lyle Kopnicky
On Tue, Jun 2, 2009 at 1:03 PM, Paul Johnson p...@cogito.org.uk wrote: Lyle Kopnicky wrote: I think it's a combination of 1) the expressiveness measure is too simplistic, measuring number of lines alone, or counting comments, and 2) the problem set is skewed toward number-crunching, which

Re: [Haskell] The speed, size and dependability of programming languages

2009-06-01 Thread Lyle Kopnicky
Thanks for the link. I find the expressiveness results odd. How can SML/NJ be among the least expressive languages, while MLTON and OCAML are among the most expressive? How is Smalltalk less expressive than Java? Why are Prolog and Mercury among the least expressive? I think it's a combination of

[Haskell-cafe] lift in TemplateHaskell?

2009-04-14 Thread Lyle Kopnicky
Hi folks, I'm having trouble reading the TemplateHaskell docs and trying to do something that seems like it should be simple. In MetaML, there is a 'lift' function which does exactly what I want to do. Here's an example function: let double n = [| 2 * $( litE (integerL n) ) |] This works as

[Haskell-cafe] Re: lift in TemplateHaskell?

2009-04-14 Thread Lyle Kopnicky
OK, I figured it out. The class is Language.Haskell.TH.Syntax.Lift. The function is Language.Haskell.TH.Syntax.lift. And I can rewrite my function as: let double n = [| 2 * n |] I wish this were explained in the TemplateHaskell documentation. - Lyle On Tue, Apr 14, 2009 at 2:51 PM, Lyle

[Haskell-cafe] Missing dependency?

2009-04-02 Thread Lyle Kopnicky
Hi folks, Since the time package is not included in ghc-6.10.2, I installed it via cabal. Then I tried to configure my project, and it says that the dependency is missing. Mysterious. Can anyone explain? l...@lwk-desktop:~/devel/vintage-basic$ ghc-pkg list

Re: [Haskell] ANNOUNCE: GHC version 6.10.2

2009-04-01 Thread Lyle Kopnicky
Great! But what happened to the time package? It was in 6.10.1. Has it been intentionally excluded from 6.10.2? On Wed, Apr 1, 2009 at 1:21 PM, Ian Lynagh ig...@earth.li wrote: == The (Interactive) Glasgow Haskell Compiler --

Re: [jhc] Re: [Haskell] ANNOUNCE: jhc 0.6.0 Haskell Compiler

2009-03-23 Thread Lyle Kopnicky
Those are impressive results. Typically on programming language benchmarks, the speed of ghc-generated code fares well against C, sometimes outperforming it, at best being 20x faster, at worst being 3x slower. Since it already seems fast enough, I'm astonished that jhc could make it even faster.

Re: [Haskell-cafe] ANNOUNCE: Vintage BASIC 1.0

2009-03-14 Thread Lyle Kopnicky
I've posted a new version, 1.0.1, that has a usage message if you run it with no arguments. There is a package for Windows now (not just a binary) as well as Linux. Both packages include documentation and example programs. Thanks for pointing that out! On Fri, Mar 13, 2009 at 1:31 AM, Wolfgang

Re: [Haskell-cafe] ANNOUNCE: Vintage BASIC 1.0

2009-03-13 Thread Lyle Kopnicky
On Fri, Mar 13, 2009 at 1:31 AM, Wolfgang Jeltsch jelt...@informatik.tu-cottbus.de wrote: When running the executable, nothing happens. The executable should show a usage message instead. Where are the BASIC programs? I think, you have to grab them from the source. They should be installed,

[Haskell-cafe] ANNOUNCE: Vintage BASIC 1.0

2009-03-12 Thread Lyle Kopnicky
I am pleased to announce the initial release of Vintage BASIC, an interpreter for microcomputer-era BASIC. Fully unit-tested, it faithfully implements the common elements of the language. On the web site, you can find 102 games from the classic book BASIC Computer Games, all of which run

Re: [Haskell-cafe] Distributing Linux binaries

2009-03-12 Thread Lyle Kopnicky
Thanks, folks. I have decided for now just to release a tarball with an executable and some docs, that can be expanded where the user deems appropriate. I'll try a static link if people are having problems with it. - Lyle ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Distributing Linux binaries

2009-03-10 Thread Lyle Kopnicky
Thanks folks for your replies. I did learn, from your e-mails and from the cabal documentation (example 9 on page http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/builders.htm), how to build a tarball with an executable and LICENSE file, via cabal copy. It would have been nice to

[Haskell-cafe] Distributing Linux binaries

2009-03-09 Thread Lyle Kopnicky
Hi folks, I've got an application to release. I'm releasing the source, but I also wanted to release binary versions for people that don't have GHC. I developed on Windows, so making a Windows executable was simple. I also have access to an Ubuntu Linux box, on which I can easily build and test

[Haskell-cafe] Haskell Fest

2009-02-09 Thread Lyle Kopnicky
Looks like a lot of fun! http://www.haskellchamber.com/page6.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] GHC 6.11 missing time package?

2009-02-08 Thread Lyle Kopnicky
or Cygwin to complete this build. Here you can find instructions regarding MSYS (and also GLUT, but you can ignore that part): http://www.haskell.org/pipermail/haskell-cafe/2007-September/031535.html All best Christopher Skrzętnicki 2009/2/1 Lyle Kopnicky li...@qseep.net I tried building

Re: [Haskell-cafe] GHC 6.11 missing time package?

2009-02-01 Thread Lyle Kopnicky
if there's something wrong with the package, or I don't have something set up right to build it on Windows. On Sat, Jan 31, 2009 at 10:13 PM, Antoine Latter aslat...@gmail.com wrote: 2009/1/31 Lyle Kopnicky li...@qseep.net: Hi folks, I'm getting ready to release a piece of software

[Haskell-cafe] GHC 6.11 missing time package?

2009-01-31 Thread Lyle Kopnicky
Hi folks, I'm getting ready to release a piece of software. Unfortunately due to a bug in GHC 6.10 on Windows it does not handle Ctrl+C properly. Since the bug has been fixed (thank you Simon Marlow), I figured I'd download a 6.11 build (I grabbed the 2009-01-29 version). Unfortunately, my

[Haskell-cafe] How does one use Text.Regex.Base.RegexLike?

2008-12-23 Thread Lyle Kopnicky
I'm trying to migrate code from using the old Text.Regex to the new Text.Regex.Base. But, I'm getting type errors. I can't even create a regex. Looking at the docs, it seems like this should print bcd: import Data.Array import Text.Regex.Base import Text.Regex.Posix rx = makeRegex a(.*)A Just

Re: [Haskell-cafe] How does one use Text.Regex.Base.RegexLike?

2008-12-23 Thread Lyle Kopnicky
: Hello, Does this help? http://www.serpentine.com/blog/2007/02/27/a-haskell-regular-expression-tutorial/ j. At Tue, 23 Dec 2008 11:21:41 -0800, Lyle Kopnicky wrote: [1 multipart/alternative (7bit)] [1.1 text/plain; ISO-8859-1 (7bit)] I'm trying to migrate code from using the old

Re: [Haskell-cafe] How does one use Text.Regex.Base.RegexLike?

2008-12-23 Thread Lyle Kopnicky
daniel.is.fisc...@web.dewrote: Am Dienstag, 23. Dezember 2008 21:09 schrieb Lyle Kopnicky: Yes, sort of. It enables me to get some simple examples working with (=~). But I still don't know how to get makeRegex to work. You need it to specify options like case insensitivity, or to use functions

Re: [Haskell-cafe] Re: TimeDiff to Int?

2008-11-13 Thread Lyle Kopnicky
secondsSinceMidnight = do zonedTime - getZonedTime return $ floor $ toRational $ timeOfDayToTime $ localTimeOfDay $ zonedTimeToLocalTime zonedTime On Thu, Nov 13, 2008 at 2:29 AM, Jon Fairbairn [EMAIL PROTECTED]wrote: Lyle Kopnicky [EMAIL PROTECTED] writes: I had some code using the oldtime

[Haskell-cafe] TimeDiff to Int?

2008-11-12 Thread Lyle Kopnicky
Hi folks, I had some code using the oldtime package, and want to convert it to use the time package. One of the things I need to do is calculate the number of seconds since midnight. The easy part is getting a TimeDiff result: utc - getCurrentTime tz - getCurrentTimeZone let td =

Re: [Haskell-cafe] TimeDiff to Int?

2008-11-12 Thread Lyle Kopnicky
are a bit hard to follow. Especially confusing is the conversions. I'm thinking of making a multiparameter Coercible class, with a coerce function, to help address that. - Lyle On Wed, Nov 12, 2008 at 9:43 AM, Philip Weaver [EMAIL PROTECTED]wrote: 2008/11/12 Lyle Kopnicky [EMAIL PROTECTED] Hi

[Haskell-cafe] getLine and ^C on Windows

2008-11-12 Thread Lyle Kopnicky
Hi folks, I'm using System.IO.getLine to read input in my program. I've compiled it on Windows Vista with ghc-6.10.1. I've noticed that if I press Ctrl+C while the program is waiting for input, it will get stuck. No keypresses can get me out of the program - I have to kill the shell. I've tried

Re: [Haskell-cafe] vector vs uvector

2008-07-14 Thread Lyle Kopnicky
stefan kersten wrote: hi, what's the difference between the vector [1] and uvector [2] packages? should one of those preferred over the other? thanks, sk [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/vector-0.1 [2]

Re: [Haskell-cafe] uvector and the stream interface

2008-07-14 Thread Lyle Kopnicky
Don Stewart wrote: Yes, we have long been discussing a generic Stream library to which the various sequence structures can be translated to and from. Already it is useful to say, stream bytestrings into uvectors and out to lists. Isn't there already such a thing?

[Haskell-cafe] Poor Parsec error message

2008-07-10 Thread Lyle Kopnicky
Hi folks, I'm using Parsec to parse a stream of tokens. The token primitive takes, among other arguments, a function to print tokens. However, this function is not always applied. Try the code below: - import Text.ParserCombinators.Parsec import

Re: [Haskell-cafe] Poor Parsec error message

2008-07-10 Thread Lyle Kopnicky
I figured it out, but it's not pretty. The problem is that the eof parser had no awareness of the showTok function. To fix the problem, I had to replace eof with its definition in terms of notFollowedBy, then replace notFollowedBy with its definition in terms of try and unexpected. Then, I

Re: [Haskell-cafe] Aim Of Haskell

2006-12-11 Thread Lyle Kopnicky
Taral wrote: On 12/11/06, Nia Rium [EMAIL PROTECTED] wrote: In my humble opinion, in this context, GUI doesn't mean a library to implement a GUI application. It rather means an interpreter/compiler that provides graphical interface. Windows users can use Visual Haskell... It's still in an

[Haskell-cafe] Why so slow?

2006-12-10 Thread Lyle Kopnicky
The code below is using way more RAM than it should. It seems to only take so long when I build the 'programs' list - the actual reading/parsing is fast. For a 5MB input file, it's using 50MB of RAM! Any idea how to combat this? Thanks, Lyle {-# OPTIONS_GHC -fglasgow-exts #-} --

[Haskell] Re: Streams 0.1 ported to GHC 6.6

2006-10-17 Thread Lyle Kopnicky
Bulat Ziganshin wrote: Hello Lyle and all, i'm glad to inform you that Stream 0.1 library is now compatible with just released GHC 6.6. please download new version as http://www.haskell.org/library/Streams.tar.gz this archive contains file Streams.cabal.6.6 that is cabal file developed

[Haskell-cafe] Multiple stages in Template Haskell

2006-10-10 Thread Lyle Kopnicky
Hi folks, I noticed that in Template Haskell, you can only have one level of splicing or quasi-quoting. E.g., you can't write: $(zipN ($(sel 2 3) (zip level,3,( ['a'..'Z'] [1..] (words now is the time) Because you can't have a splice inside a splice. But wouldn't it be handy to use

Re: [Haskell-cafe] Error building Edison 1.2.0.1

2006-10-06 Thread Lyle Kopnicky
Robert Dockins wrote: On Thursday 05 October 2006 16:51, Lyle Kopnicky wrote: Robert Dockins wrote: mtl is the Monad Transformer Library. It's a part of the standard libraries in 6.4.x. There's been a good deal of chatter recently about reducing the set of libraries

Re: [Haskell-cafe] Error building Edison 1.2.0.1

2006-10-05 Thread Lyle Kopnicky
Robert Dockins wrote: On Wednesday 04 October 2006 16:16, Lyle Kopnicky wrote: Robert Dockins wrote: Whats the output of ghc-pkg -l ? [EMAIL PROTECTED]:~$ ghc-pkg -l /usr/local/lib/ghc-6.5.20060924/package.conf: Cabal-1.1.4, base-2.0, (ghc

Re: [Haskell-cafe] Error building Edison 1.2.0.1

2006-10-04 Thread Lyle Kopnicky
Robert Dockins wrote: On Tuesday 03 October 2006 22:58, Lyle Kopnicky wrote: Robert Dockins wrote: On Tuesday 03 October 2006 22:00, Lyle Kopnicky wrote: Hi folks, I tried to build edison-1.2.0.1-sources with the command 'make system' but got

[Haskell-cafe] Error building Edison 1.2.0.1

2006-10-03 Thread Lyle Kopnicky
Hi folks, I tried to build edison-1.2.0.1-sources with the command 'make system' but got: *** Exception: Line 10: Unknown field 'hs-source-dirs' I am using GHC 6.4.1. Any idea how to fix this? Thanks, Lyle ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Error building Edison 1.2.0.1

2006-10-03 Thread Lyle Kopnicky
Robert Dockins wrote: On Tuesday 03 October 2006 22:00, Lyle Kopnicky wrote: Hi folks, I tried to build edison-1.2.0.1-sources with the command 'make system' but got: *** Exception: Line 10: Unknown field 'hs-source-dirs' I am using GHC 6.4.1. Any idea how to fix

Re: [Haskell-cafe] Optimizing a title matcher

2006-09-27 Thread Lyle Kopnicky
Ketil Malde wrote: Do you really need that to search for movie titles? At any rate, an exact-match finite-map implementation is a good start - to get good performance, you probably will need to use some kind of index to reduce the amount of data to search exhaustively (all-against-all). For

Re: [Haskell-cafe] Re: Getting the latest

2006-09-27 Thread Lyle Kopnicky
Max Vasin wrote: Lyle I have no idea how it decides where to go. Right now ghc Lyle 6.4.1 is in /usr/local/bin/ghc. After I 'make install', will it Lyle be ghc 6.5? I don't want to screw up the installed package so it Lyle can't be updated later. It should be :-) It should be screwed up? Or

Re: [Haskell-cafe] Unable to profile program using Data.ByteString.Lazy

2006-09-26 Thread Lyle Kopnicky
Donald Bruce Stewart wrote: You're cabal version is too old then. Try updating either Cabal or GHC. -- Don It's the latest version (6.4.1) packaged for Ubuntu. I'll have to download and install a newer version manually. Unfortunately, the download site seems to be down again :(

[Haskell-cafe] Optimizing a title matcher

2006-09-26 Thread Lyle Kopnicky
Hi folks, I'm competing in a contest at work, and we're allowed to use whatever language we want. I decided this was my chance to prove to people that Haskell was up to the challenge. Unfortunately, I ran into performance problems. Since the contest ends this Friday, I've decided to switch to

[Haskell-cafe] Getting the latest

2006-09-26 Thread Lyle Kopnicky
Hi folks, I am running GHC 6.4.1 on my Linux box at work, which is the latest packaged version for Ubuntu Dapper Drake. (They have a 6.4.2 package for Edgy, but I don't know how to install that. The Synaptic Package Manager seems to only want to install packages specifically labeled for

Re: [Haskell-cafe] Optimizing a title matcher

2006-09-26 Thread Lyle Kopnicky
Lemmih wrote: Do you have some test input online? I've attached some (very short) input files. Sorry I can't provide more - they're proprietary databases. I know that means you can't actually test the performance, but can only give me advice. At least you can run the program on them, and

Re: [Haskell-cafe] Optimizing a title matcher

2006-09-26 Thread Lyle Kopnicky
Robert Dockins wrote: Humm... well, double nested loops seems like the wrong approach. It may be. I had hoped it would be fast enough that way. Also, if you are using GHC, it's hashtable implementation has farily well-known performance problems. If all you care about is exact matching, then

Re: [Haskell-cafe] Optimizing a title matcher

2006-09-26 Thread Lyle Kopnicky
Bertram Felgenhauer wrote: Lyle Kopnicky wrote: [snip] listRecords :: AbsString s = TextTable s - IO [TextRecord s] listRecords (TextTable fields _ records) = do keyRecs - HT.toList records return $ map (fromList . zip fields . elems . snd) keyRecs Doing

Re: [Haskell-cafe] Optimizing a title matcher

2006-09-26 Thread Lyle Kopnicky
Hi folks, It turns out Haskell is vindicated. It's my algorithm that was slow. As Robert Dockins pointed out, the double nested loop is just going to take a long time. As evidence, it turns out my C++ version is just as slow as the Haskell version. So, I'm going to go back to Haskell, but

Re: [Haskell-cafe] Unable to profile program using Data.ByteString.Lazy

2006-09-24 Thread Lyle Kopnicky
Donald Bruce Stewart wrote: Probably you didn't build fps with profiling as well? You can rebuild fps with: runhaskell Setup.hs configure -p as the first step. -- Don Thanks, I'll try it. Does that mean when I want to optimize my program, I'll need to rebuild fps without profiling?

[Haskell-cafe] Unable to profile program using Data.ByteString.Lazy

2006-09-23 Thread Lyle Kopnicky
Hi folks, I wrote a program that uses some of the Data.ByteString libraries. I'm using GHC 6.4.1 and FPS 0.7. The program compiles and works just fine. But when I try to profile it, by compiling with -prof, I get: Failed to load interface for `Data.ByteString.Lazy': Could not

[Haskell-cafe] System threads?

2006-09-19 Thread Lyle Kopnicky
Hi folks, I'm working on a project for which the solution is highly parallelizable. I've been writing it so far for GHC as a single-threaded app. I'd like to be able to split the job into multiple pieces, and spawn different system threads for each piece, so they will run on separate CPUs.

[Haskell-cafe] SMTP, HTTP, Telnet

2006-06-16 Thread Lyle Kopnicky
Hi all, Anybody know of some good Haskell libraries providing: an SMTP client, an HTTP client, or a Telnet client? There's a significant amount to these protocols, over and above the socket layer. Thanks, Lyle Kopnicky ___ Haskell-Cafe

[Haskell-cafe] Bug in WinHugs?

2006-06-13 Thread Lyle Kopnicky
Hi folks, I just installed the May 2006 release of Hugs. When I use the command-line version, the '$$' symbol to reference the last expression works fine. It does not work in WinHugs, but yields 'ERROR - Syntax error in expression (unexpected symbol $$)'. I typed ':set' to verify the '-r$$'

Re: [Haskell] Mixing monadic and non-monadic functions

2005-09-15 Thread Lyle Kopnicky
Bulat Ziganshin wrote: Hello Ben, Wednesday, September 14, 2005, 6:32:27 PM, you wrote: BRG do { ... ; ... borrow E ... ; ... } BRG is transformed into BRG do { ... ; x - E ; ... x ... ; ... } i strongly support this suggestion. actually, i suggest the same for dealing with

[Haskell] Re: Mixing monadic and non-monadic functions

2005-09-14 Thread Lyle Kopnicky
It appears to me that: * Many people don't like having to extract values from a monad on a separate line, but would like to be able to mix monadic return values into pure expressions, on the way to calculating a monadic result. * Some people want to fix this by doing an implicit lifting

[Haskell-cafe] Re: [Haskell] Haskell recruitment?

2004-09-06 Thread Lyle Kopnicky
I think there are so few such opportunities that it would not overwhelm the list. I should also point out that you can post such openings at http://www.haskell.org/jobs.html by sending an e-mail to [EMAIL PROTECTED] and [EMAIL PROTECTED] Regards, Lyle Jochen L. Leidner wrote: Finally, would

Re: [Haskell-cafe] Partially-applied type synonyms?

2004-09-02 Thread Lyle Kopnicky
Shan wrote: On 2004-08-31T09:55:10-0700, Lyle Kopnicky wrote: Sorry, I don't think I made myself clear. I'm not defining PI, it's the standard type binding operator, like lambda is the variable binding operator. Maybe I could write it as 'II' so it looks more like a capital pi. It's

[Haskell-cafe] Partially-applied type synonyms?

2004-08-30 Thread Lyle Kopnicky
' to take the arguments the other way around. Unfortunately, it can't be partially applied. Any ideas, or is it just not feasible to work this class into the library? Thanks, Lyle Kopnicky ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http

Re: [Haskell-cafe] Hiding functions

2004-08-13 Thread Lyle Kopnicky
. Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Lyle | Kopnicky | Sent: 12 August 2004 20:23 | To: Haskell Cafe | Subject: [Haskell-cafe] Hiding functions | | Hi all, | | I'm working on a program that uses my own brand of exceptions, and I

Re: [Haskell-cafe] Hiding functions

2004-08-13 Thread Lyle Kopnicky
Alistair, I'm throwing my own exceptions in my own monad, not the IO one. But thanks for pointing me to the stuff about dynamic types. I'm going to be creative and pick some new names. - Lyle Bayley, Alistair wrote: What is wrong with creating your own catch and throw with different names?

Re: [Haskell-cafe] Combination-lock problem

2004-08-12 Thread Lyle Kopnicky
Even shorter: c=mapM(\k-[0..k]) - Lyle Fritz Ruehr wrote: Well, as far as that goes, we can shave off a little bit (around 7%) this way: combs = mapM (\k-[0..k]) (As a bonus, it's even a bit more cryptic/symbolic, in the fine tradition of APL one-liner character-shavings.) But who's

Re: [Haskell-cafe] Closed Classes

2004-08-12 Thread Lyle Kopnicky
Notwithstanding module Y, I don't think you should infer in module X that g::Int (or, rather, Int-Int). Since f is defined in a type class, it should be polymorphic, and so should g. When you apply g to a type, it will check to see what instances are available, and match only if Int is the

Re: [Haskell-cafe] Combination-lock problem

2004-08-11 Thread Lyle Kopnicky
Henning Thielemann wrote: On Wed, 11 Aug 2004, Lyle Kopnicky wrote: Here's my version: combs [] = [] combs [n] = [[i] | i - [0..n]] combs (n:r) = let combsr = combs r in [i:cr | i - [0..n], cr - combsr] Since there is one zero combination, it should be combs [] = [[]] Ah, yes. I

Re: [Haskell-cafe] Library sizes (was: Toy application advice wanted)

2004-05-06 Thread Lyle Kopnicky
, but need only be done once the program is ready for distribution. If anyone knows of existing solutions in either of these areas, please inform us. - Lyle Kopnicky Duncan Coutts wrote: On Wed, 2004-05-05 at 16:24, Andrei de A. Formiga wrote: I'm finding wxHaskell very nice

Re: [Haskell-cafe] Toy application advice wanted

2004-05-05 Thread Lyle Kopnicky
be something like a two-liner... A one-liner: main = interact (show . length . lines) - Lyle Kopnicky ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: How do I sleep in Ghc?

2003-12-08 Thread Lyle Kopnicky
ld compile this code separately and call it via the FFI. If it doesn't work on Windows, you could instead call: Win32::Sleep(TIME) [CORE] Pauses for TIME milliseconds. The timeslices are made available to other processes and threads. Hope that helps, Lyle Kopnicky BTW