Re: [Haskell-cafe] ANN: conduit-network-stream, A base layer for network protocols with Conduits

2013-02-25 Thread Nils
Of course you don't have to use my library if your library already solves the same problem. Am 25.02.2013 13:10, schrieb Alexander V Vershilov: data Result = Error Text ByteString | NeedMore (ByteString -> Result a) | HaveResult a I still see an issue with this if you're receiving multiple me

Re: [Haskell-cafe] ANN: conduit-network-stream, A base layer for network protocols with Conduits

2013-02-25 Thread Nils
s to exactly one `send`. Without this library you have to manually check/verify/associate each message by hand in one big loop, whereas this library allows you to split your application into logical conduit "groups" which are straight forward to use. - Nils ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] [Haskell] ANN: Haskell bindings for the igraph C library

2012-12-17 Thread Nils Schweinsberg
toUndirected g :: Graph U a toDirected w :: Graph (Weighted D) a This is even revertable, and `toDirected . toUndirected == id` while the FGL function `undir` simply adds all missing edges and loses track of what the original/directed graph looked like. Maybe George has more details on why he

[Haskell-cafe] ANN: Haskell bindings for the igraph C library

2012-12-16 Thread Nils Schweinsberg
igraph-0.6 C library) The official igraph website: http://igraph.sourceforge.net/index.html Until hackage generates the haddock documentation, the documentation is also available at: http://hs.nils.cc/igraph-0.1/html/index.html Any feedback is appreciated, - Nils Schweinsberg - George

[Haskell-cafe] GHCi + FFI + global C variables

2012-12-09 Thread Nils
cannot just change the C code to simply not use any global variables at all. - Nils ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] haskell cryptogaphic libraries

2012-08-24 Thread Nils Schweinsberg
Am 24.08.2012 14:47, schrieb marcmo: > * AES Encryption/Decryption (CBC-Mode) For AES there is the "SimpleAES" package[1] which is super easy to use: > import qualified Data.ByteString as BS > import Data.ByteString.Lazy as BL > > import Codec.Crypto.SimpleAES > > key :: IO Key >

Re: [Haskell-cafe] GSoC proposal: Units for GHC

2012-04-04 Thread Nils Schweinsberg
than as result from a division. This would require modifications to GHC at compiler level. A library could offer some basic units (SI units for example) and maybe even unit aliases (" = "), but I don't see how the "core" of this "unit verificati

[Haskell-cafe] GSoC proposal: Units for GHC

2012-04-04 Thread Nils Schweinsberg
till 2 days left for the student application and hopefully I'll get some good feedback by then. - Nils [1]: http://research.microsoft.com/en-us/um/people/akenn/units/index.html [2]: http://research.microsoft.com/en-us/um/people/akenn/units/MLWorkshop2008.pdf [3]: https://gi

Re: [Haskell-cafe] [Agda] Defining subtraction for naturals

2011-03-17 Thread Nils Anders Danielsson
On 2011-03-17 19:35, wren ng thornton wrote: Dependently typed languages tend to use the second definition because it gives a pure total function (unlike the first) and because it's less obnoxious to use than the third. In Haskell the third would be even more obnoxious. There is a fourth option

Re: [Haskell-cafe] GHC 7.0.1 developer challenges

2010-11-25 Thread Nils Anders Danielsson
On 2010-11-25 01:59, John D. Ramsdell wrote: The irony of this situation is deep. CPSA is a program that analyzes cryptographic protocols in an effort to expose security flaws. To ensure that the program does not crash a user's machine, I have to use a linker option that may expose the user to

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
Am 11.11.2010 14:25, schrieb Stephen Tetley: I'm not sure about an environment variable. Adding the MinGW\ prefix looks wrong, you may have to experiment with paths and forward or back slash separators a bit. I can't remember which convention (Windows) cabal uses. I tried every possible combina

Re: [Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
Am 11.11.2010 13:41, schrieb Stephen Tetley: Do you have the headers installed as well as the dlls? For headers, MSys will have a search path of at least these two directories msys\1.0\local\include MinGW\include Is there an environment variable for this? As I said, I tried using --extra-inc

[Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
ation is MinGW/msys with gcc 4.5, ghc 6.12.3, cabal-install 0.8.2, cabal 1.8.0.6. libcurl.dll and pcre.dll are the latest builds from the official webpages. Thanks for any Help, Nils PS: Sorry for the previous (incomplete) mail. ___ Haskell-Cafe

[Haskell-cafe] build-type: configure on windows

2010-11-11 Thread Nils Schweinsberg
Hi, I'm having a few problems with cabals build-type "configure" on windows, especially with the packages "curl" and "pcre-light". Both fail either with: * Missing C library: pcre ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.

Re: [Haskell-cafe] windows network programming

2010-11-02 Thread Nils Schweinsberg
Am 02.11.2010 19:57, schrieb Michael Litchard: got any urls with examples? Sure, see this short server-client-ping-pong application. By the way, I noticed that you don't need withSocketsDo on windows 7, but I guess it's there for a reason for older windows versions. :) import Control.

Re: [Haskell-cafe] windows network programming

2010-11-02 Thread Nils Schweinsberg
Am 02.11.2010 01:20, schrieb Paulo Tanimoto: http://hackage.haskell.org/package/network You just have to remember that you need to call "withSocketsDo" on windows before doing anything with the network library. ___ Haskell-Cafe mailing list Haskell-

Re: [Haskell-cafe] Parsing workflow

2010-10-31 Thread Nils Schweinsberg
Am 31.10.2010 16:53, schrieb Vo Minh Thu: I can't really tell from your description, but maybe this is because of the way Parsec works when it deals with alternatives. When you combine several parsers with e.g. '<|>' or 'choice', an alternative that can consume some input but fails will make the

Re: [Haskell-cafe] Parsing workflow

2010-10-31 Thread Nils Schweinsberg
Am 31.10.2010 16:50, schrieb Ozgur Akgun: > I don't know if you've already used it, but Parsec includes some kind of > a lexer through the Language > > and Token >

[Haskell-cafe] Parsing workflow

2010-10-31 Thread Nils Schweinsberg
s I said above? I guess that parsing a simple list of tokens without any nested parser structures would be pretty fast? - Do you have any other ideas on how to improve my parser? - What are your general thoughts on happy vs. parsec? Thanks for any replies, Nils _

Re: [Haskell-cafe] ANN: happstack-auth-0.2

2010-09-18 Thread Nils Schweinsberg
Am 17.09.2010 22:06, schrieb Nils Schweinsberg: [1] http://hackage.haskell.org/package/happstack-auth Hackage fails to build this package: http://hackage.haskell.org/packages/archive/happstack-auth/0.2/logs/failure/ghc-6.12 However, "Crypto == 4.*" should be on hack

Re: [Haskell-cafe] Ultra-newbie Question

2010-09-18 Thread Nils Schweinsberg
Am 18.09.2010 09:51, schrieb Christopher Tauss: I am trying to write a function that takes a list and returns the last n elements. last_n n = fst . foldr step ([], n) where step _ (xs, 0) = (xs, 0) step x (xs, n) = (x:xs, n-1) ___ Haskell-Ca

[Haskell-cafe] ANN: happstack-auth-0.2

2010-09-17 Thread Nils Schweinsberg
. Hope you enjoy it! :) - Nils Schweinsberg / McManiaC * You can still use the old state-query/update constructors by importing "Happstack.Auth.Internal", although you'll miss a lot of features like session management etc. In addition, MightyBytes old repo should be sti

[Haskell-cafe] Combining applicative with arrows?

2010-09-10 Thread Nils Schweinsberg
CollectA Test collectTest' = ... -- arrow stuff >>> Test <$> collectString <*> collectInt Is something like this possible? I don't understand that "proc" part good enough to see what it's actually do

Re: [Haskell-cafe] Style and a problem

2010-09-09 Thread Nils Schweinsberg
] myNub :: (Ord a) => [[a]] -> [[a]] myNub = nubBy (\a b -> sort a == sort b) - Nils ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Is 'flip' really necessary?

2010-07-26 Thread Nils Schweinsberg
On 26.07.2010 23:55, Ozgur Akgun wrote: I think it is pretty cool as well. But I think there is a problem with viewing it as a wildcard. let's say we define the following: (??) = flip foo :: a -> b -> c foo ?? x :: a -> c Perfect! But saying ?? can be used as a wildcard might in the followin

Re: [Haskell-cafe] Is 'flip' really necessary?

2010-07-26 Thread Nils
On 26.07.2010 08:33, David Virebayre wrote: listeEtagTot = concatMap (`listeEtagArm` cfgTypesTringle) listeArmOrd You can use flip as a "wildcard" aswell: > listeEtagTot = concatMap (listeEtagArm `flip` cfgTypesTringle) listeArmOrd Makes it even more readable in my opinion, since this reall

Re: [Haskell-cafe] use of modules to save typing

2010-07-08 Thread Nils
On 08.07.2010 11:15, Michael Mossey wrote: Whoa, I just realized I'm not using 'modify' to full advantage. This can be written incrCursor = modify incrCursor' incrCursor' (PlayState cursor len verts doc) = PlayState (min (cursor+1)(len - 1)) len verts doc) Thats what lambdas are good for: inc

Re: [Haskell-cafe] Re: Is my code too complicated?

2010-07-04 Thread Nils Schweinsberg
On Sun, 4 Jul 2010 15:47:21 +0200, Ertugrul Soeylemez wrote: > This requires a bunch of type system extensions, though, most notably > the UndecidableInstances extension. But it's safe to use here. Probably a bit off topic, but whats wrong with UndecidableInstances? Where is it safe to use, when

Re: [Haskell-cafe] MState: A consistent State monad for concurrent applications

2010-07-02 Thread Nils Schweinsberg
On 03.07.2010 03:27, Matthew Gruen wrote: Awesome. I needed something like that once, too, down to the same type signature for the fork function. Here's an instance from my code: instance MonadFork (ReaderT s IO) where fork newT = ask>>= liftIO . forkIO . runReaderT newT I've added this i

Re: [Haskell-cafe] Looking for GUI (WX) example code

2010-07-02 Thread Nils Schweinsberg
On 02.07.2010 23:02, Günther Schmidt wrote: Hi all, I'd be interested in studying GUI (wxhaskell) code. Does anyone have links to good gui code? Not wxHaskell, but I just wrote a very small gtk2hs application.[1] Should give you a quick overview of how things work with gtk. :) [1] http://g

Re: [Haskell-cafe] MState: A consistent State monad for concurrent applications

2010-07-02 Thread Nils Schweinsberg
And here wo go. MState on hackage: http://hackage.haskell.org/package/mstate My first hackage library. :) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] MState: A consistent State monad for concurrent applications

2010-07-02 Thread Nils Schweinsberg
On 02.07.2010 20:05, Jason Dagit wrote: In other words, don't be shy! Ok, thanks for the reply! :) However, a question about haddock: evalMState :: Forkable m => MState t m a -- ^ Action to evaluate -> t -- ^ Initial state value

[Haskell-cafe] MState: A consistent State monad for concurrent applications

2010-07-02 Thread Nils Schweinsberg
quot; function. This function will asure that every thread in an "evalMState"/"execMState" call will be finished before the final result is returned. The library is also on github.com.[2] Please let me know what you think of it and whether or not I should put it on hackage.

[Haskell-cafe] Re: dirs in Emacs/Vim in Cabal

2010-07-01 Thread Nils Anders Danielsson
On 2010-06-30 18:38, Chris BROWN wrote: My question is: Is it possible to allow the emacs/vim scripts that I have know where this directory is automatically? Maybe you could adapt the approach taken by Agda. Agda's Emacs mode is installed using Cabal plus a small script: 1) The Emacs Lisp sour

Re: [Haskell-cafe] ANN: bitspeak 0.0.1

2010-06-21 Thread Nils Schweinsberg
On 21.06.2010 23:50, Maurí­cio CA wrote: Hi, all, bitspeak is a small proof of concept application that allows writing text using only two commands (yes/no, 1/2, top/down etc.). Looks cool! Did you forget any dependencies tho? I get the following error: 0:16 nils` cabal update Downloading

Re: [Haskell-cafe] Hierachical abstraction

2010-01-29 Thread Nils Anders Danielsson
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

Re: [Haskell-cafe] Hierachical abstraction

2010-01-28 Thread Nils Anders Danielsson
On 2010-01-28 20:31, Luke Palmer wrote: I could be mistaken, but at least there are both Applicative and Arrow parser libraries. I don't know how to classify the language that they parse -- it is not strictly context-free. It corresponds roughly to context-free where certain types of infinite cha

Re: [Haskell-cafe] Cabal

2009-12-17 Thread Nils Anders Danielsson
On 2009-11-09 12:39, Duncan Coutts wrote: You'll be glad to know this is addressed in Cabal-1.8, though not in a fully automatic way. The problem with sharing automatically is knowing when it is safe to do so and when it is not. Each component that shares a source file can use different compiler

Re: [Haskell-cafe] Natural Language Processing

2009-12-10 Thread Nils Anders Danielsson
On 2009-12-10 01:11, John D. Earle wrote: Is Parsec capable of parsing a mildly context sensitive language? I expect that one can parse any decidable language using Parsec. Whether it is convenient to do so is another question. -- /NAD ___ Haskell-Ca

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-10 Thread Nils Anders Danielsson
On 2009-12-10 07:16, o...@okmij.org wrote: There are at least two parser combinator libraries that can deal with *any* left-recursive grammars. Parser combinators are often used to describe infinite grammars (with a finite number of parametrised non-terminals). The library described by Frost et

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Nils Anders Danielsson
On 2009-12-09 18:50, Dan Doel wrote: (Your parsers aren't PEGs, are they? If so, I apologize for the redundancy.) No, my parsers use Brzozowski derivatives. See the related work section of the paper I mentioned for some other parser combinator libraries which can handle (some) left recursive g

Re: [Haskell-cafe] Parsec-like parser combinator that handles left recursion?

2009-12-09 Thread Nils Anders Danielsson
On 2009-12-08 16:11, S. Doaitse Swierstra wrote: In principle it is not possible to parse left-recursive grammars [...] I suspect that this statement is based on some hidden assumption. It /is/ possible to parse many left recursive grammars using parser combinators, without rewriting the gramma

Re: [Haskell-cafe] Re: What *is* a DSL?

2009-10-27 Thread Nils Anders Danielsson
On 2009-10-22 14:44, Robert Atkey wrote: On Sat, 2009-10-10 at 20:12 +0200, Ben Franksen wrote: Since 'some' is defined recursively, this creates an infinite production for numbers that you can neither print nor otherwise analyse in finite time. Yes, sorry, I should have been more careful the

Re: [Haskell-cafe] What *is* a DSL?

2009-10-27 Thread Nils Anders Danielsson
On 2009-10-22 14:56, Robert Atkey wrote: Yes, it might have been that, OTOH I'm sure I saw it in some Haskell code. Maybe I was imagining it. There is some related Haskell code in the Agda repository. Do you know of a characterisation of what languages having a possibly infinite amount of non

Re: [Haskell-cafe] What *is* a DSL?

2009-10-13 Thread Nils Anders Danielsson
On 2009-10-07 17:29, Robert Atkey wrote: A deep embedding of a parsing DSL (really a context-sensitive grammar DSL) would look something like the following. I think I saw something like this in the Agda2 code somewhere, but I stumbled across it when I was trying to work out what "free" applicativ

Re: [Haskell-cafe] evaluation semantics of bind

2009-02-06 Thread Nils Anders Danielsson
On 2009-02-05 15:20, Gregg Reynolds wrote: I think I've just about got monads figured out, but [...] I don't think anyone has mentioned Simon's "Tackling the awkward squad" paper in this thread. This tutorial, which contains a semantics for a subset of IO, should answer some of the questions ra

Re: [Haskell-cafe] ANNOUNCE: haskell-src-exts 0.4.8

2009-01-09 Thread Nils Anders Danielsson
On 2009-01-09 00:51, Niklas Broberg wrote: - Support for Unicode symbols for e.g. ->. Fixing that would require me to have a Unicode-compliant editor Can't you just use character literals like '\x2192'? -- /NAD This message has been checked for viruses but the contents of an attachment may s

Re: [Haskell-cafe] More accessible papers

2007-11-21 Thread Nils Anders Danielsson
On Wed, 21 Nov 2007, Peter Verswyvelen <[EMAIL PROTECTED]> wrote: > Yes, but why don't researchers just publish their TEX file? You can > regard that as the "source code" for generating PDF/PS whatever no? Typically researchers have to give away the copyright to their papers upon publication. How

Re: [Haskell-cafe] Using type-level programming to tag functions with time and space complexity

2007-11-13 Thread Nils Anders Danielsson
On Thu, 18 Oct 2007, Daniel McAllansmith <[EMAIL PROTECTED]> wrote: > I was wondering if anyone had done work on tagging functions at the type > level > with their time or space complexity and, if it's even feasible, calculating > the complexity of compound functions. > > Any pointers? I have

Re: [Haskell-cafe] agda v. haskell

2007-09-29 Thread Nils Anders Danielsson
On Fri, 28 Sep 2007, Jeff Polakow <[EMAIL PROTECTED]> wrote: > Agda is essentially an implementation of a type checker for > Martin-Lof type theory (i.e. dependent types). > > It is designed to be used as a proof assistant. Well, the language aims to become a practical programming language. U

Re: [Haskell-cafe] Spot the difference!

2007-09-20 Thread Nils Anders Danielsson
On Thu, 20 Sep 2007, PR Stanley <[EMAIL PROTECTED]> wrote: > \_ n -> 1 + n > \_ -> (\n -> 1 + n) > The outcome seems to be identical. is there a substantive difference > between the two definitions? No, since you do not pattern match on the first argument. Otherwise, due to the way these definiti

Re: [Haskell-cafe] Disadvantages of de Bruijn indicies?

2007-05-14 Thread Nils Anders Danielsson
On Sun, 13 May 2007, Stefan Holdermans <[EMAIL PROTECTED]> wrote: > Anyway, Conor and James' Haskell Workshop paper on manipulating > syntax that involves both free and bound variables [1] is really nice > and could perhaps be of interest to you. If I remember correctly this paper is not about a

Re: [Haskell-cafe] built-in lists vs inductively defined list

2007-05-09 Thread Nils Anders Danielsson
On Wed, 09 May 2007, Stefan O'Rear <[EMAIL PROTECTED]> wrote: > To the best of my knowledge, there are no optimizations specific to [] > in the compiler proper. > > However, the standard library has a *lot* of speed hacks you will need > to duplicate! Some of which are not expressible in "ordinar

Re: [Haskell-cafe] Article review: Category Theory

2007-01-19 Thread Nils Anders Danielsson
On Fri, 19 Jan 2007, Ulf Norell <[EMAIL PROTECTED]> wrote: > Personally I think that the distinction between _|_ and \x -> _|_ is > a mistake and should be ignored whenever possible. If you want to write an accessible tutorial you should probably use a total programming language, or at least the

Re: Resending: [Haskell-cafe] MissingH: profiler support?

2007-01-12 Thread Nils Anders Danielsson
On Thu, 11 Jan 2007, Chris Eidhof <[EMAIL PROTECTED]> wrote: > On 8 Jan, 2007, at 23:13 , Chris Eidhof wrote: > >> I'm trying to profile my application, which makes use of MissingH. >> But when compiling with -prof -auto-all, I get the following error: >> >>> Language.hs:8:7: >>> Could not fin

[Haskell-cafe] Re: Fractional/negative fixity?

2006-11-08 Thread Nils Anders Danielsson
On Wed, 08 Nov 2006, Henning Thielemann <[EMAIL PROTECTED]> wrote: > If the Prelude would be splitted into modules, where (==) and (+) > are separated, and no module imports the other one, then we need a > third module, which states the relation between (==) and (+). Yes, presumably. However, cur

[Haskell-cafe] Re: Fractional/negative fixity?

2006-11-08 Thread Nils Anders Danielsson
On Wed, 08 Nov 2006, "Arie Peterson" <[EMAIL PROTECTED]> wrote: > Specifying precedence 'lazily', by a partial order, does not suffer from > this problem, because it only requires you to make local decisions. Assuming we only want to be able to make local decisions. Let's say that we want == to

Re: [Haskell-cafe] List comparisons and permutation group code

2006-10-19 Thread Nils Anders Danielsson
On Thu, 19 Oct 2006, Tomasz Zielonka <[EMAIL PROTECTED]> wrote: > On Thu, Oct 19, 2006 at 01:37:16PM -0400, Cale Gibbard wrote: > >> In order to determine if [1..length xs] has an element at all, you >> have to evaluate length xs, which involves forcing the entire spine of >> xs, because integers

Re: [Haskell-cafe] Re: Automatic fixity allocation for symbolic operators

2006-10-17 Thread Nils Anders Danielsson
On Mon, 16 Oct 2006, Jón Fairbairn <[EMAIL PROTECTED]> wrote: > I made a more concrete proposal later and Phil Wadler tidied it up. > I think It even got as far as a draft of the language, [...] Do you know where this proposal/draft can be found? -- /NAD ___

Re: [Haskell-cafe] Re: Functional progr., infinity, and the Universe

2006-06-26 Thread Nils Anders Danielsson
On Sat, 24 Jun 2006, Paul Hudak <[EMAIL PROTECTED]> wrote: > Hmmm... never tried to write all this down in one place before, but I > think this covers all cases: > > A partial list is one that ends in _|_. > A total list is one that ends in []. > A finite list is either partial or total. > Any oth

Re: [Haskell-cafe] Distributing monadic(?) functions across dyadic functions

2006-04-03 Thread Nils Anders Danielsson
On Sun, 02 Apr 2006, "Jared Updike" <[EMAIL PROTECTED]> wrote: > Something like "distribute fst (==)" where > >> distribute f op x y = f x `op` f y A function like this has been suggested for the standard libraries a couple of times before. Someone suggested the name "on", which I quite like:

Re: [Haskell-cafe] Re: Positive integers

2006-03-24 Thread Nils Anders Danielsson
On Fri, 24 Mar 2006, Henning Thielemann <[EMAIL PROTECTED]> wrote: > Further on think of QuickCheck: A Cardinal type with an Arbitrary > instance would save us the (>=0) condition and it would reduce the > number of tests that must be skipped because of non-fulfilled > conditions. Because I was c

[Haskell-cafe] MUA written in Haskell (was: Getting GHC to print "Done" when it's finished linking?)

2006-03-08 Thread Nils Anders Danielsson
On Tue, 07 Mar 2006, "Brian Hulley" <[EMAIL PROTECTED]> wrote: (Moved from ghc-users.) > Brian Hulley wrote: > (time for a proper email client to be written in Haskell! ;-) ) I had the same thought yesterday, after an Emacs-Lisp session in which I was trying to get Gnus to do exactly what I wan

Re: [Haskell-cafe] Credit Card Authorization code

2006-03-06 Thread Nils Anders Danielsson
On Thu, 02 Mar 2006, "S. Alexander Jacobson" <[EMAIL PROTECTED]> wrote: > I am looking for Haskell code that does credit card authorization? > e.g. paypal website pro does not supply a Haskell lib. I think that WASH/CGI contains code for doing some sort of checksum check on credit card numbers:

Re: [Haskell-cafe] module for probability distributions

2006-03-01 Thread Nils Anders Danielsson
On Thu, 16 Feb 2006, Matthias Fischmann <[EMAIL PROTECTED]> wrote: > I wrote a module for sampling arbitrary probability distribution, so > far including normal (gaussian) and uniform. > - There is probably a better implementation out there already. > Please point me to it. Martin Erwig an

Re: [Haskell-cafe] enforcing strictness on arbitrary subexpressions

2006-03-01 Thread Nils Anders Danielsson
On Thu, 16 Feb 2006, Udo Stenzel <[EMAIL PROTECTED]> wrote: >> hPutStr stdout $ foldr seq veryLongString veryLongString > > There is no primitive to do this for arbitrary data types, but the > DeepSeq type class comes close. You can find DeepSeq and some more > hints on strict evaluation at >

[Haskell-cafe] Enforcing coding policy (was: Why or why not haskell ?)

2005-12-12 Thread Nils Anders Danielsson
On Sun, 11 Dec 2005, Tomasz Zielonka <[EMAIL PROTECTED]> wrote: > I would like to see some support in tools for enforcing such a coding > policy. It could look like this - a function written using only safe > components would be marked as safe. Every unsafe feature like FFI, > unsafePerformIO, etc

[Haskell-cafe] Re: Making Haskell more open

2005-11-11 Thread Nils Anders Danielsson
On Fri, 11 Nov 2005, Tomasz Zielonka <[EMAIL PROTECTED]> wrote: [Moved to cafe.] > How about an integrated newsgroup+mailinglist+forum. If we had a > two-way newsgroup+mailinglist integration, people could use it also > as a forum, for example through gmail.google.com. But I don't use > fora, so

Re: [Haskell-cafe] Detecting Cycles in Datastructures

2005-10-27 Thread Nils Anders Danielsson
On Thu, 27 Oct 2005, Lennart Augustsson <[EMAIL PROTECTED]> wrote: > Tom Hawkins wrote: > >> Or phased differently, is it possible to make "Expr" an instance of >> "Eq" such that cyclic == cyclic is smart enough to avoid a recursive >> decent? > > No. And there is nothing that says that your defi

Re: [Haskell-cafe] Quickcheck examples and Data.Word32

2005-10-27 Thread Nils Anders Danielsson
On Thu, 27 Oct 2005, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: > instance Arbitrary Word32 where > arbitrary = do c <- arbitrary :: Gen Integer > return (fromIntegral c) This definition will usually only generate very small or very large Word32 values. The reason is the wrapp

Re: [Haskell-cafe] Re: Coarbitrary

2005-10-27 Thread Nils Anders Danielsson
On Thu, 27 Oct 2005, Shae Matijs Erisson <[EMAIL PROTECTED]> wrote: > Joel Reymont <[EMAIL PROTECTED]> writes: > >> I could not understand how to define this for arbitraries of my >> choosing and Shae seems to have defined coarbitrary = error "Not >> implemented" :-). > > Coarbitrary is for genera

Re: [Haskell-cafe] Parsing in Practice

2005-10-18 Thread Nils Anders Danielsson
On Tue, 18 Oct 2005, Philippa Cowderoy <[EMAIL PROTECTED]> wrote: > If you've got a decent chunk of test data or don't mind generating > it with QuickCheck odds are you can spot it reasonably quickly when > it happens. When I write a parser I usually also write a pretty-printer (or ugly-printer)

Re: [Haskell-cafe] Re: Alternatives to hs-plugins?

2005-10-07 Thread Nils Anders Danielsson
On Thu, 06 Oct 2005, John Goerzen <[EMAIL PROTECTED]> wrote: > Quick question: am I correct in thinking that this code, while it uses > Hugs, won't actually run from Hugs, due to lack of piping support in > Hugs? Quite possibly. -- /NAD ___ Haskell-C

Re: [Haskell-cafe] Alternatives to hs-plugins?

2005-10-06 Thread Nils Anders Danielsson
On Thu, 06 Oct 2005, John Goerzen <[EMAIL PROTECTED]> wrote: > I'm wondering if there are any alternatives? Can a Haskell program > using Hugs call Hugs to evaluate an arbitrary hunk of code? Although it is not very efficient you can of course call Hugs and parse its output. I have some working

Re: [Haskell-cafe] Confused about types

2005-10-05 Thread Nils Anders Danielsson
On Wed, 05 Oct 2005, Henning Thielemann <[EMAIL PROTECTED]> wrote: > If this shall be more than a disposable example, I suggest to separate > the Newton iteration from the abort of the iteration. There is a related example, demonstrating this technique, in "Why Functional Programming Matters":

Re: [Haskell-cafe] Papers from the 2005 Haskell Workshop (Tallinn)?

2005-10-05 Thread Nils Anders Danielsson
On Wed, 05 Oct 2005, Dimitry Golubovsky <[EMAIL PROTECTED]> wrote: > The papers presented at the Workshop are already available in the ACM > library which requires membership/subscription to read full text PDFs. > Are there any plans to make those papers available anywhere else on > the Web withou

Re: [Haskell-cafe] How to debug GHC

2005-09-01 Thread Nils Anders Danielsson
On Thu, 01 Sep 2005, Frederik Eaton <[EMAIL PROTECTED]> wrote: > But getting a stack backtrace when there is an error should be a > pretty basic feature. It's very hard to debug a large program when you > can randomly get messages like "*** Exception: Prelude.head: empty > list" and have no idea w

[Haskell-cafe] Re: Backwards-Compatibility

2005-07-01 Thread Nils Anders Danielsson
On Wed, 29 Jun 2005, Sven Moritz Hallberg <[EMAIL PROTECTED]> wrote: > Am 29. Jun 2005 um 11.03 Uhr schrieb Simon Marlow: > >> On 28 June 2005 14:11, Bulat Ziganshin wrote: >> >>> [...] how about using Pesco's library versioning scheme? (see >>> http://www.haskell.org/tmrwiki/EternalCompatibilityI