The definition of lhsfun in the report

2001-05-10 Thread Mads Lindstrøm
I'am confused about the funlhs production, in Report on the programming Language Haskell 98 of the 1st February 1999. In the report one of the funlhs-productions is (see page 127): funlhs - var apat {apat} That is a var followed by one to many apat. But you can have functions like

Re: [Haskell] How to substract a list?

2005-03-28 Thread Mads Lindstrøm
to load the List module (in Hugs :load List). Hope it helps, Mads Lindstrøm so pairs [(2,1),(1,1)] removed. Tks. --- Pierre Barbier de Reuille [EMAIL PROTECTED] wrote: One answer is the infix operator (\\) defined in the List module (or in Data.List ...) But it's in ont

[Haskell] Beyond ASCII only editors for Haskell

2005-05-22 Thread Mads Lindstrøm
of thoughts please let yourself be heard. Also, of cause, comments are most welcome. -- Mads Lindstrøm [EMAIL PROTECTED] ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Beyond ASCII only editors for Haskell

2005-05-22 Thread Mads Lindstrøm
Jesper Louis Andersen wrote: Mads Lindstrøm wrote: But if I were to specify a program (in a non-executable language) or if I were to write some function on a blackboard, I would not be restricted to only ASCII characters. For example, I would not write 'sqrt 2' but I would write

Re: [Haskell] Beyond ASCII only editors for Haskell

2005-05-23 Thread Mads Lindstrøm
involved a better idea. And I do think we could invent some kind of framework, consisting of questions to be answered, that could help decide which symbols to use and which not to use. -- Mads Lindstrøm [EMAIL PROTECTED] ___ Haskell mailing list Haskell

Re: [Haskell] Beyond ASCII only editors for Haskell

2005-05-23 Thread Mads Lindstrøm
you have any papers or other kind of documentation describing the system? what worked and what did not work? -- Mads Lindstrøm [EMAIL PROTECTED] ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Template id function

2005-07-13 Thread Mads Lindstrøm
Is this possible? if yes, how does one do it? -- Mads Lindstrøm [EMAIL PROTECTED] ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Ambiguity problem

2005-07-22 Thread Mads Lindstrøm
. Hope, somebody can enlighten me. Greetings, Mads Lindstrøm ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Ambiguity problem

2005-07-22 Thread Mads Lindstrøm
and it works. However, it does seem ugly to have an extra argument, just to please the type checker. This extra argument can fortunately be limited to a few functions, in the program I am working on. /Mads Lindstrøm Wolfgang Jeltsch: Am Freitag, 22. Juli 2005 14:58 schrieb Mads Lindstrøm: Hi I

Re: [Haskell] reflection/metadata in Haskell?

2005-09-21 Thread Mads Lindstrøm
Hi Srinivas Nedunuri I'm sure this question has been asked before, (but unf. the Haskell archives aren't searchable without downloading each month seperately), so I hope You can search here: http://www.mail-archive.com/haskell@haskell.org/ nobody minds me asking again. Is there any way to

RE: [Haskell] reflection/metadata in Haskell?

2005-09-22 Thread Mads Lindstrøm
was that SYB, opposed to Java-type reflection, has compile-time type checking. Well, most of its constructs are checked at compile-time. /Mads Lindstrøm - Generic Haskell is effectively a Haskell generator Ralf P.S.: Another way to get *compile-time* reflection in Haskell is of course type-level

[Haskell] Modelling languages for FP (like UML for OO)

2006-01-19 Thread Mads Lindstrøm
for the creates of FAD, using it? If you are using FAD, what are your experiences with it? I am mainly interested in the macro level. That is modules, classes, class instances, ... Not in modellering the internals of a function. Greetings, Mads Lindstrøm

[Haskell] Type synonyms in the instance head

2006-02-02 Thread Mads Lindstrøm
/Mads Lindstrøm ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] The Cell processor and Haskell

2006-03-16 Thread Mads Lindstrøm
programs? /Mads Lindstrøm ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] AutoForms release 0.2

2006-08-27 Thread Mads Lindstrøm
comments will be much appreciated. Greetings, Mads Lindstrøm ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Capturing output from System.system

2007-01-16 Thread Mads Lindstrøm
Hi All Haskeleers The function System.system (:: String - IO ExitCode) makes the OS execute it first parameter as a command. It prints its output to standard output and standard error. How do I easily capture this output? /Mads Lindstrøm ___ Haskell

[Haskell] Summer of code Haddock complains about module which is not loaded

2007-08-07 Thread Mads Lindstrøm
Why is it Haddock cannot find the Bar module? After all I mention Bar.hs in the invocation of haddock. Greetings, Mads Lindstrøm ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

[Haskell] Swapping parameters and type classes

2007-09-16 Thread Mads Lindstrøm
(Foo a) where ... But what if I want to apply the 'b' ? How do I do that ? Greetings, Mads Lindstrøm ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Swapping parameters and type classes

2007-09-17 Thread Mads Lindstrøm
What surprises me is that I still need to look at `second`, even though I use BarB. I thought I was swapping the parameters. Whats more changing the line: type instance BarB a b = Foo b to type instance BarB a b = Foo a -- the last letter changed has no effect. Greetings, Mads Lindstrøm P.s

[Haskell] Announce: AutoForms release 0.3

2007-10-01 Thread Mads Lindstrøm
://www.haskell.org/haskellwiki/AutoForms for more information. Greetings, Mads Lindstrøm ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Using GHC as a library with own functions makes runStmt return RunBreak

2008-01-30 Thread Mads Lindstrøm
in MyPrelude, runStmt also returned RunBreak. So is it only possible to load home-grown/non-standard modules when also doing a regular import? Greetings, Mads Lindstrøm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http

Re: Using

2008-01-31 Thread Mads Lindstrøm
Mads Lindstrøm mads_lindstroem at yahoo.dk writes: So is it only possible to load home-grown/non-standard modules when also doing a regular import? Here I really mean: So is it only possible to load home-grown/non-standard modules _without_ also doing a regular import? I could also pose

Re: Using GHC as a library with own functions makes runStmt return RunBreak

2008-01-31 Thread Mads Lindstrøm
Mads Lindstrøm mads_lindstroem at yahoo.dk writes: Hi I am trying to use GHC as a library. From runStmt, I want to load and run functions from a home-grown module. Lets call my home-grown module HomeGrown.hs. I have tried to model my application after http://haskell.org/sitewiki

GHC as a library - getting output from GHCI

2007-05-04 Thread Mads Lindstrøm
do not see and easy way to get hold of it. The only way I see, is having the GUI in one process and GHC as a library in another process. Do anybody know of an easy way to get hold of the output from GHC as a library - the output currently printed to standard output? Greetings, Mads Lindstrøm

Re: GHC as a library - getting output from GHCI

2007-05-06 Thread Mads Lindstrøm
Hi Pepe Pepe Iborra wrote: Mads On 04/05/2007, at 19:19, Mads Lindstrøm wrote: Hi Pepe I would have liked something cross-platform. Take a look at the unix-compat[1] package by Bjorn Bringert, although it looks like it won't help you. Maybe it can be extended. Also

Re: GHC as a library - getting output from GHCI

2007-05-09 Thread Mads Lindstrøm
Hi Look at System.Posix.IO I do not know if that module can do what you want. But it does deal with FileDescriptors and handles. Maybe the dup function can help you. According to http://www2.lib.uchicago.edu/~keith//tcl-course/topics/processes.html it does: The dup implements the dup system

RE: GHC as a library - getting output from GHCI

2007-05-09 Thread Mads Lindstrøm
Hi Simon The Interactive.hs program do not really redirect stdout. It intercepts calls to putStrLn and getLine via let definitions: mustWork let putStrLn = MyPrelude.myPutStrLn mustWork let getLine = MyPrelude.myGetLine -- mustWork either runs the given statement successfully

Re: GHC as a library - getting output from GHCI

2007-05-09 Thread Mads Lindstrøm
Hi While wrapIO works in most cases, try running this: :m +Control.Concurrent forkIO (let foo = do threadDelay 100; print A; foo in foo) I am not saying that this makes wrapIO unusable - just that it is not bulletproof. If not using forkIO is ok, then this is a much easier solution, than

How to to terminate runStmt in GHC as a library

2007-05-20 Thread Mads Lindstrøm
. Greetings, Mads Lindstrøm module Main where -- Compile with: ghc -package ghc-6.6 --make StopingRunStmt.hs import qualified GHC import qualified Outputable import qualified Packages import qualified PackageConfig import DynFlags import System.IO import Control.Concurrent path = /usr/lib/ghc-6.6

GHC as a library stalls when nobody is consuming it's output

2007-05-27 Thread Mads Lindstrøm
, if WxHaskell is not happy about threading, the answer is that I run the GUI and GHC as a library in separate processes. Greetings, Mads Lindstrøm ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman

(Compile ghc 6.7) Cannot find package base

2007-08-12 Thread Mads Lindstrøm
dependencies: hpc, template-haskell, readline, unix, Cabal, base, haskell98 If anybody is interested I got the complete build logs, but given there size 2.2 megabytes (180 kilo when compressed with gzip) I choose not to include them in the message. Greetings, Mads Lindstrøm

Re: [Haskell-cafe] On the verge of ... giving up!

2007-10-14 Thread Mads Lindstrøm
think it is well worth the steep learning curve. Cheers, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] SYB3 codebase

2007-10-19 Thread Mads Lindstrøm
the number of SYB3's floating around. Greetings, Mads Lindstrøm Haskellians, Does anyone know the status of SYB3 codebase? It appears that FreshLib critically depends on it, but the code downloadable from http://homepages.cwi.nl/~ralf/syb3/code.html dies in make test on the first test

Re: [Haskell-cafe] SYB3 codebase

2007-10-19 Thread Mads Lindstrøm
. Greetings, Mads Lindstrøm P.s. if you decide using the Shelarcy patch then apply it with: patch -u -dSYB3 SYB3_Shelarcy.diff Greg Meredith: Haskellians, Does anyone know the status of SYB3 codebase? It appears that FreshLib critically depends on it, but the code downloadable from http

Re: [Haskell-cafe] Transformation sequence

2007-10-20 Thread Mads Lindstrøm
need to read the logged values when the transformation has occurred, not while it is occurring. Greetings, Mads Lindstrøm You store the transformation sequence in the state while processing the tree, then you simply retrieve the state and print it out. Your transformation function should

Re: [Haskell-cafe] SYB3 codebase

2007-10-21 Thread Mads Lindstrøm
Hi Ian Ian Lynagh: On Fri, Oct 19, 2007 at 07:59:37PM +0200, Mads Lindstrøm wrote: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/syb-with-class-0.3 (hereafter know as HappS-SYB3). HappS-SYB3 is based on the SYB3 code you mention, but the code has been changed quite a bit

Re: [Haskell-cafe] expanded standard lib

2007-11-19 Thread Mads Lindstrøm
. That is, if 10 libraries/programs use library X, then library X gets 10 votes. Kind of like Google PageRank for libraries. Greetings, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Searched for mdo on haskell.org. Found nothing.

2007-11-22 Thread Mads Lindstrøm
not by default index short words (length = 3 or length = 4 - can't remember which). If you search for yhc you also get zero results, which does not make sense either. Greetings, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] US Homeland Security program language security risks

2008-01-06 Thread Mads Lindstrøm
Hi, Andrew Coppin wrote: Galchin Vasili wrote: Hello, https://buildsecurityin.us-cert.gov/daisy/bsi/articles/knowledge/coding/295.html I stumbled across this page. It seems that Haskell and other strongly typed functional languages like Ml/OCaml will fare much, much better,

[Haskell-cafe] Why no instance of Happstack.Data.Default.Default for Data.ByteString.Lazy

2010-03-19 Thread Mads Lindstrøm
. Greetings, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Haskell (Byte)Strings - wrong to separate content from encoding?

2010-03-19 Thread Mads Lindstrøm
type, which contains both content and encoding, would be standardizing on some encoding like UTF-8. I realize that we have the utf8-string package on Hackage, but people (at least Happstack and Network.HTTP) seem to prefer ByteString. I wonder why. Greetings, Mads Lindstrøm signature.asc

Re: [Haskell-cafe] Bytestrings and [Char]

2010-03-22 Thread Mads Lindstrøm
Hi David Leimbach wrote: On Mon, Mar 22, 2010 at 6:10 AM, Johan Tibell johan.tib...@gmail.com wrote: On Mon, Mar 22, 2010 at 1:16 PM, Johann Höchtl johann.hoec...@gmail.com wrote: My question or discussion point: Why not depreciate [Char] altogether

[Haskell-cafe] Garbage collecting pointers

2010-03-26 Thread Mads Lindstrøm
Hi For some time I have been thinking about an idea, which could limit Haskell's memory footprint. I don't know if the idea is crazy or clever, but I would love to hear peoples thoughts about it. The short story is, I propose that the garbage collector should not just reclaim unused memory, it

Re: [Haskell-cafe] Garbage collecting pointers

2010-03-26 Thread Mads Lindstrøm
Hi On Fri, 2010-03-26 at 21:24 +, Sebastian Sylvan wrote: On Fri, Mar 26, 2010 at 9:21 PM, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote: On Mar 26, 2010, at 16:28 , Mads Lindstrøm wrote: For some time I have been thinking about an idea

Re: [Haskell-cafe] Garbage collecting pointers

2010-03-26 Thread Mads Lindstrøm
Hi On Fri, 2010-03-26 at 21:33 +, Sebastian Sylvan wrote: Reorganizing data on the fly sounds like it may be a pretty sensible idea now that cache misses are so bad (in comparison). The fact that Haskell data is generally immutable helps too. However, I think your scheme sounds a bit

Re: [Haskell-cafe] libraries [was GUI haters]

2010-04-02 Thread Mads Lindstrøm
cannot generalize from COBOL programmers to programmers in say Java, in this particular case. I'll stop whining now. Greetings, Mads Lindstrøm [1] http://en.wikipedia.org/wiki/COBOL#COBOL_2002_and_object-oriented_COBOL signature.asc Description: This is a digitally signed message part

[Haskell-cafe] HXT Namespaces and XPath

2010-04-04 Thread Mads Lindstrøm
'getXPathTreesWithNsEnv' to recognize XPath namespace declarations? I am thinking about declarations like: declare namespace foobar='http://foobar.org/foobar' Greetings, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell

[Haskell-cafe] HXT error handling

2010-04-04 Thread Mads Lindstrøm
know at compile-time. Regards, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How do I use ByteString?

2010-04-06 Thread Mads Lindstrøm
Hi Don Stewart wrote: gue.schmidt: Hi all, I've never found an easy way to deal with ByteStrings. I'm using the RSA library and it en- and decodes Data.ByteString.Lazy.ByteString. I initially start with Strings, ie. [Char], but there is no function to convert the 2 back and

[Haskell-cafe] Re: HXT error handling

2010-04-06 Thread Mads Lindstrøm
Hi Uwe This is a right point. Here the current XPath calling interface is too simple. A separation into XPath parsing and evaluation would be more flexible. The parsing (and error handling of XPath syntax errors) could be done once. I will extend the interface to support this. That would be

[Haskell-cafe] Re: HXT Namespaces and XPath

2010-04-06 Thread Mads Lindstrøm
Hi Uwe I read your reply multiple times, but I am still confused. I think either I misunderstand you or I did not explain myself properly in the first mail. Hi Mads, In HXT, namespace prefixes bound by an XML document are valid in the context of an XPath. How do avoid that? An

Re: [Haskell-cafe] Re: HXT Namespaces and XPath

2010-04-06 Thread Mads Lindstrøm
Hi Replying to myself: I think another example will clarify my point. The code: simpleXmlOne, simpleXmlTwo :: String simpleXmlOne = a:Foo xmlns:a=\http://foo.org\/ simpleXmlTwo = b:Foo xmlns:b=\http://foo.org\/ nsEnv :: [(String, String)] nsEnv = [ (notFoo, http://notfoo.org;) ]

Re: [Haskell-cafe] Re: HXT Namespaces and XPath

2010-04-07 Thread Mads Lindstrøm
Hi Uwe Hi Mads, Replying to myself: I think another example will clarify my point. The code: simpleXmlOne, simpleXmlTwo :: String simpleXmlOne = a:Foo xmlns:a=\http://foo.org\/ simpleXmlTwo = b:Foo xmlns:b=\http://foo.org\/ nsEnv :: [(String, String)] nsEnv = [

Re: [Haskell-cafe] The instability of Haskell libraries

2010-04-24 Thread Mads Lindstrøm
Hi On Sat, 2010-04-24 at 19:25 +1000, Ivan Lazar Miljenovic wrote: Roman Leshchinskiy r...@cse.unsw.edu.au writes: John Goerzen gave one in the very first post of this thread: the fix to old-locale which didn't change any types but apparently changed the behaviour of a function quite

Re: [Haskell-cafe] The instability of Haskell libraries

2010-04-24 Thread Mads Lindstrøm
Hi On Sat, 2010-04-24 at 19:47 +1000, Ivan Lazar Miljenovic wrote: Mads Lindstrøm mads.lindstr...@gmail.com writes: You could automatically generate QuickCheck tests for many pure functions. It will not catch every API change, but it would catch some. It would have caught the API change

[Haskell-cafe] Getting used and available memory

2010-04-27 Thread Mads Lindstrøm
Hi I have tried haskell.org, Google and Hoolge, but I cannot find any function to give me the available and/or used memory of a Haskell program. Is it just not there? Or am I missing it somehow? /Mads ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Getting used and available memory

2010-04-27 Thread Mads Lindstrøm
at 12:01 PM, Mads Lindstrøm mads.lindstr...@gmail.com wrote: Hi I have tried haskell.org, Google and Hoolge, but I cannot find any function to give me the available and/or used memory of a Haskell program. Is it just not there? Or am

Re: [Haskell-cafe] happstack/SOAP

2010-04-28 Thread Mads Lindstrøm
Hi I do not have an example for you, but I do have some text conversion functions you may find useful. I have attached the text conversion functions in a file. /Mads On Mon, 2010-04-26 at 09:46 +, Johannes Waldmann wrote: Hi - I'm looking for an example/demo happstack server that handles

Re: [Haskell-cafe] Getting used and available memory

2010-04-28 Thread Mads Lindstrøm
Hi On Tue, 2010-04-27 at 14:55 -0700, Don Stewart wrote: We could bind to Rts.c in the GHC runtime, and get all the stats programmatically that you can get with +RTS -s That would be nice. /Mads ___ Haskell-Cafe mailing list

[Haskell-cafe] Control.Exception try and catch

2010-04-28 Thread Mads Lindstrøm
Hi From http://haskell.org/ghc/docs/6.12.1/html/libraries/base-4.2.0.0/Control-Exception.html#3 ... The difference between using try and catch for recovery is that in catch the handler is inside an implicit block (see Asynchronous Exceptions) which is important when catching asynchronous

Re: [Haskell-cafe] ANNOUNCE: happstack 0.5.0

2010-05-03 Thread Mads Lindstrøm
Hi Pressing documentation-link here http://happstack.com/index.html I still get the 0.4.1 version. But impressive set of new features. /Mads On Mon, 2010-05-03 at 12:57 -0500, Jeremy Shaw wrote: (Note: Reply-to is set to haskell-cafe@haskell.org) Hello, I am very pleased to announce

Re: [Haskell-cafe] Simple network client

2008-01-29 Thread Mads Lindstrøm
)` with this: mapM_ (\x - putStr (show x) hFlush stdout) res it works. I _think_ the problem is that `putStrLn (show res)` will wait until it has read all of res. But as the client do not know when the server is finished sending data, the client will wait forever. Greetings, Mads

Re: [Haskell-cafe] Haskell wiki is searched by google.

2008-02-13 Thread Mads Lindstrøm
. See http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html . After doing this the indexes needs to be rebuild. Greetings, Mads Lindstrøm Richard. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Doubting Haskell

2008-02-17 Thread Mads Lindstrøm
Hi Alan I can help but feeling curious. Did some of the answers actually help you? Are you still as doubtful about Haskell as when you wrote your email? Greetings, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] MonadMemory class

2008-03-28 Thread Mads Lindstrøm
not think you can call it standard, but TypeCompose http://hackage.haskell.org/cgi-bin/hackage-scripts/package/TypeCompose-0.5 do implement Data.RefMonad, which does what you are describing. Greetings, Mads Lindstrøm What kind of axioms should an instance of this class satisfy? 2. How would

Re: [Haskell-cafe] Replacing RDMS - global lock and STM preventing retrying?

2008-04-26 Thread Mads Lindstrøm
RDBMS-es? Greetings, Mads Lindstrøm One solution I came up within minutes :) I love haskell. You write it down fix error and it works :) Would you prefer another way to solve this? --packages: containers, binary, stm, mtl, random module Main where import System.IO.Unsafe import

Re: [Haskell-cafe] Replacing RDMS - why I want this retrying?

2008-04-26 Thread Mads Lindstrøm
the execution plan once. PostgreSQL seems to supports preparing both parse result and the prepare-plan result (see http://www.postgresql.org/docs/8.1/interactive/sql-prepare.html ). /Mads Lindstrøm b) Type safety. HaskellDB is nice.. But it's limiting because you can't optimize queries very

[Haskell-cafe] Using Template Haskell to make type-safe database access

2008-05-02 Thread Mads Lindstrøm
) list. Due to step two we can make the returned values type-safe. Greetings, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Using Template Haskell to make type-safe database access

2008-05-05 Thread Mads Lindstrøm
disadvantage. Actually it do not seem much of a disadvantage it all, as most code accessing SQL databases depends on database metadata anyway. Greetings, Mads Lindstrøm Hope this helps, Wouter ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Using Template Haskell to make type-safe database access

2008-05-07 Thread Mads Lindstrøm
Hi Wouter Wouter Swierstra wrote: Here's a concrete example. Suppose you have a query q that, when performed, will return a table storing integers. I can see how you can ask the SQL server for the type of the query, parse the response, and compute the Haskell type [Int]. I'm not sure

Re: [Haskell-cafe] Using Template Haskell to make type-safe database access

2008-05-08 Thread Mads Lindstrøm
knows a lot more about interfacing with databases than I do. Kind regards, Wouter /Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Using Template Haskell to make type-safe database access

2008-05-14 Thread Mads Lindstrøm
packaged up and wrote a little tutorial about my other project (SybWidget). I already started that about three weeks ago, so it should be finished soon. Greetings, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

[Haskell-cafe] Value classes

2009-12-30 Thread Mads Lindstrøm
properly thought about it before, but gave it a different name. If anybody has links to some papers it would be much appreciated. If anybody has some thoughts of the desirability of value class it would also be much appreciated. /Mads Lindstrøm signature.asc Description: This is a digitally

[Haskell-cafe] Recursively traversing a data structure with HXT

2010-01-31 Thread Mads Lindstrøm
in the right direction. Greetings, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Cabal will not find HaXml

2010-02-28 Thread Mads Lindstrøm
fix it? Greetings, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Cabal will not find HaXml

2010-02-28 Thread Mads Lindstrøm
Hi The --user flag did the trick. Thank you very much. /Mads Daniel Fischer wrote: Am Sonntag 28 Februar 2010 14:41:03 schrieb Mads Lindstrøm: Hi When I do: cabal list --simple-output | grep -i HaXml 1.20 I get: HaXml 1.20 HaXml 1.20.1 HaXml 1.20.2 So

Re: [Haskell-cafe] How to show a variable with show?

2005-05-05 Thread Mads Lindstrøm
it helps, Mads Lindstrøm [EMAIL PROTECTED] Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Re: Why I Love Haskell In One Simple Example

2005-06-27 Thread Mads Lindstrøm
Hi John Goerzen On 2005-06-27, Mads Lindstrøm [EMAIL PROTECTED] wrote: Hi John test :: forall a. (Num a) = a test = 2 * 5 + 3 [ snip ] I had newer seen anybody use forall a. in function signatures before, and therefore was curious about its effect. This is probably do to my

Re: [Haskell-cafe] ANNOUNCE: secure-sockets version 1.0

2010-09-08 Thread Mads Lindstrøm
Hi David On Mon, 2010-09-06 at 13:50 -0700, David Anderson wrote: - Simple timing attacks: If code path A takes longer than code path B to execute, an attacker can use that information to reverse engineer the outcome of branching tests, and from there possibly recover secret key

[Haskell-cafe] Protocol buffer network examples

2010-10-12 Thread Mads Lindstrøm
buffers. Hope somebody can help, Mads Lindstrøm [1] http://hackage.haskell.org/package/protocol-buffers [2] http://code.google.com/p/protobuf/ [3] Delimited messages is a protocol buffers technique, where one writes the size of the message before the actual message: http://code.google.com/apis

[Haskell-cafe] Things I would like to see in protocol-buffers

2010-10-13 Thread Mads Lindstrøm
, to implement this feature. What do people think of these ideas? Regards, Mads Lindstrøm [1] http://code.google.com/apis/protocolbuffers/docs/proto.html#options [2] http://hackage.haskell.org/package/protocol-buffers [3] http://code.google.com/apis/protocolbuffers/docs/techniques.html#union

[Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-12 Thread Mads Lindstrøm
in the Haskell server? I have attached JavaServer.java. Regards, Mads Lindstrøm import javax.net.*; import java.net.*; import javax.net.ssl.*; import java.io.*; class Client { public static void main(String[] args) { try { int port = 8000; String hostname = 192.168.1.6; // Insert

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-12 Thread Mads Lindstrøm
Hi again, I found a simpler way to test the server connection, but it is still not working. Namely, penssl s_client -connect 192.168.1.6:8000 CONNECTED(0003) 18683:error:140790E5:SSL routines:SSL23_WRITE:ssl handshake failure:s23_lib.c:188: Regards, Mads Lindstrøm On Sun, 2010-12

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-13 Thread Mads Lindstrøm
Hi Vincent, On Mon, 2010-12-13 at 08:51 +, Vincent Hanquez wrote: that doesn't buy much since nobody should connect to a pure SSLv2 server. For the openssl cmdline, you can add a simple -ssl3 flag or -tls1 flag to start negociating at the right version straight away. Yes, that worked

Re: [Haskell-cafe] Taking the TLS package for a spin ... and failing

2010-12-14 Thread Mads Lindstrøm
. /Mads On Mon, 2010-12-13 at 08:51 +, Vincent Hanquez wrote: On Sun, Dec 12, 2010 at 08:13:59PM +0100, Mads Lindstrøm wrote: Hi Haskellers, I am trying to connect a Java client to a Haskell server using the Haskell tls package, and things are not working out for me

[Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

2010-12-14 Thread Mads Lindstrøm
as suggestions for a better interface. Regards, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

2010-12-16 Thread Mads Lindstrøm
back to 1. So even though the TLS code blocks on the handle, that's in a different thread from the code which is waiting on the socket to accept additional connections. Take care, Antoine On Tue, Dec 14, 2010 at 2:21 PM, Mads Lindstrøm mads.lindstr...@gmail.com wrote: Hi Haskeleers

Re: [Haskell-cafe] TLS package server interface do not seem to allow for asyncrhonious communication

2010-12-16 Thread Mads Lindstrøm
Hi Antoine On Thu, Dec 16, 2010 at 2:38 PM, Mads Lindstrøm Maybe a better interface would be along the lines of: -- | Do not use the handle when you are done! openTLSConnection: Handle - { information? Maybe not needed} - IO TLSConnection And then some thread-safe operations

Re: [Haskell-cafe] Why is Haskell flagging this?

2010-12-18 Thread Mads Lindstrøm
Hi Michael The type of lst is IO [Int] and therefore fmap (+1) applies (+1) to the hole lists of integers, and not to each member of the list. That is: fmap (+1) lst = fmap (+1) (return [1,2,3,4,5]) = return ([1,2,3,4,5] + 1) and you cannot say [1,2,3,4,5] + 1. Does that make sense? Maybe

[Haskell-cafe] When is it OK to create a new mailing list?

2009-05-02 Thread Mads Lindstrøm
is meant by proper authority? Can I just try to create one and see if I am successful? Or must I request someone to do it? Regards, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing list)

2009-05-04 Thread Mads Lindstrøm
classes like MouseEvents, KeyboardEvents, Activated, ... /Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Writing a compiler in Hakell

2009-05-09 Thread Mads Lindstrøm
predefined parsing combinators in uu-parselib do make for a steep learning curve. Kind regards, Mads Lindstrøm [1] http://hackage.haskell.org/cgi-bin/hackage-scripts/package/uu-parsinglib [2] http://hackage.haskell.org/packages/archive/parsec/3.0.0/doc/html/Text-Parsec-Combinator.html

Re: [Haskell-cafe] haskell - main function

2009-05-09 Thread Mads Lindstrøm
of x == 6. But generally speaking, you want to include compiler output in this is not compiling-messages to haskell-cafe. Regards, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list

[Haskell-cafe] Utrecht Attribute Grammar and Emacs

2009-06-15 Thread Mads Lindstrøm
Hi Has anybody implemented an Emacs mode for the Utrecht Attribute Grammar System (UUAG), and is willing to share it ? Greetings, Mads Lindstrøm signature.asc Description: This is a digitally signed message part ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] ORM for haskell?

2009-06-30 Thread Mads Lindstrøm
explicit join conditions. Unfortunately, natural joins seems like they were explicitly designed to create trouble. It would be nice if they fixed SQL to consider relationships. Greetings, Mads Lindstrøm signature.asc Description: This is a digitally signed message part

Re: [Haskell-cafe] ORM for haskell?

2009-06-30 Thread Mads Lindstrøm
to care about ids. you just assign a new value and tell the engine that it should commit. So again less chances to get something wrong. Could you not do in SQL: UPDATE pupils SET age = 14 WHERE age = 13 That is, without using ids. Greetings, Mads Lindstrøm signature.asc Description

Re: [Haskell-cafe] ORM for haskell?

2009-07-02 Thread Mads Lindstrøm
Hi Marc Weber Hi Mads! On Tue, Jun 30, 2009 at 11:49:40PM +0200, Mads Lindstrøm wrote: Hi Marc Weber Another example: Updating the age of a pupil: row = SELECT * FROM pupils where age = 13; UPDATE pupils SET age = 14 WHERE id = the id you got above p

Re: [Haskell-cafe] excercise - a completely lazy sorting algorithm

2009-07-06 Thread Mads Lindstrøm
Hi Petr, Maybe this will give inspiration http://en.wikipedia.org/wiki/Selection_algorithm It seems to me, that you just need a selection algorithm which works in O(n * k) time for k arbitrary elements. If you combine O(n*k) selection algorithm with any O(n * lg n) sort, you furfil your time

[Haskell-cafe] Possible bug in Data.IP (network-data package)

2009-08-01 Thread Mads Lindstrøm
I am right to see this as a bug in network-data ? Regards, Mads Lindstrøm [1] http://hackage.haskell.org/package/network-data [2] http://hackage.haskell.org/packages/archive/network-data/0.0.2/doc/html/src/Data-IP.html [3] http://tools.ietf.org/html/rfc791 [4] http://en.wikipedia.org/wiki

Re: [Haskell-cafe] Cleaning up the Debian act (report from the trenches)

2008-08-25 Thread Mads Lindstrøm
release will be there. -k Greetings, Mads Lindstrøm ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

  1   2   >