Re: [Haskell-cafe] manipulating predicate formulae

2008-12-04 Thread John Meacham
I have no idea if it is relevant, but I wrote a tiny proof assistant for a hilbert style first order logic the other day. http://repetae.net/Hilbert.hs set hasUnicode to False at the top if your terminal doesn't support unicode. fun what one can do in a few hundred lines of haskell..

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-04 Thread Immanuel Normann
Hi Ganesh, manipulating predicate formulae was a central part of my PhD research. I implemented some normalization and standarcization functions in Haskell - inspired by term rewriting (like normalization to Boolean ring representation) as well as (as far as I know) novell ideas (standardization

RE: [Haskell-cafe] ANN: Real World Haskell, now shipping

2008-12-04 Thread Tobias Bexelius
An even more painless way to do it is to edit the .cabal file (or just cabal on Windows) in the cabal user directory (somwhere under the AppData folder on windows), to have default values for extra-include-dirs and extra-lib-dirs. Then you don't need to enter them explicitly every time you use

Re: [Haskell-cafe] Re: ANNOUNCE: gitit 0.2 release - wiki using HAppS, git, pandoc

2008-12-04 Thread Thomas Schilling
Conal suggested to allow markdown/pandoc as the highlighting format for Haddock, I liked the idea, but many didn't. I guess the only workable solution would be to extend haddock to allow using an external plugin to parse the actual formatting, stripping out leading markers and somehow dealing

Re: [Haskell-cafe] Gluing pipes

2008-12-04 Thread Dan Piponi
On Wed, Dec 3, 2008 at 10:17 AM, Matt Hellige [EMAIL PROTECTED] wrote: From time to time, I've wanted to have a more pleasant way of writing point-free compositions of curried functions. I'd like to be able to write something like: \ x y - f (g x) (h y) This particular composition of f with

[Haskell-cafe] Building plugins from Hackage

2008-12-04 Thread Sol
Hello List, when I try to install the package plugins with cabal i get the following error. cabal: dependencies conflict: ghc-6.8.3 requires Cabal ==1.2.4.0 however Cabal-1.2.4.0 was excluded because plugins-1.3.1 requires Cabal ==1.4.* Is there a way to resolve this? Any ideas? Sol.

[Haskell-cafe] ANNOUNCE: haskell-src-exts 0.4.4

2008-12-04 Thread Niklas Broberg
Fellow Haskelleers, it is my pleasure to announce the new release of the haskell-src-exts package, version 0.4.4: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/haskell-src-exts-0.4.4 darcs get http://code.haskell.org/HSP/haskell-src-exts The new feature in this release is support

Re: [Haskell-cafe] Gluing pipes

2008-12-04 Thread Matt Hellige
On Thu, Dec 4, 2008 at 11:19 AM, Dan Piponi [EMAIL PROTECTED] wrote: On Wed, Dec 3, 2008 at 10:17 AM, Matt Hellige [EMAIL PROTECTED] wrote: From time to time, I've wanted to have a more pleasant way of writing point-free compositions of curried functions. I'd like to be able to write

[Haskell-cafe] Re: Gluing pipes

2008-12-04 Thread Johannes Waldmann
I'd like to be able to write something like: \ x y - f (g x) (h y) I don't think mathematicians have great notation for it either Well, there is Combinatory Logic. http://www.haskell.org/haskellwiki/Combinatory_logic J.W. ___

Re: [Haskell-cafe] Gluing pipes

2008-12-04 Thread Matt Hellige
On Thu, Dec 4, 2008 at 12:07 PM, Matt Hellige [EMAIL PROTECTED] wrote: Finally, there's a further disadvantage to both of these approaches: it seems to me that neither approach allows us to cross pipes. For instance, we can't define flip using these techniques, or any deep flip: \ x y z - f

Re: [Haskell-cafe] Gluing pipes

2008-12-04 Thread Dan Piponi
On Thu, Dec 4, 2008 at 10:21 AM, Matt Hellige [EMAIL PROTECTED] wrote: \ f x y z - f x z y == id ~ flip It's not clear to me whether your operad class can express this (or whether operads in general can express this) There exists an operad that can (at the cost of even more notation), but

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

2008-12-04 Thread ChrisK
Niklas Broberg wrote: Fellow Haskelleers, it is my pleasure to announce the new release of the haskell-src-exts package, version 0.4.4: The full list of pragmas supported by 0.4.4 is: SOURCE, RULES, DEPRECATED, WARNING, INLINE, NOINLINE, SPECIALISE, CORE, SCC, GENERATED and UNPACK. Ah,

[Haskell-cafe] Animated line art

2008-12-04 Thread Andrew Coppin
So, the muse has taken me. I'm going to attempt to produce some animated mathematical drawings involving lines and curves. Gtk2hs has a Cairo binding that should make rendering the stuff fairly straight-forward. So no problems there. Now, what I *could* do is write a new Haskell program for

Re: [Haskell-cafe] Animated line art

2008-12-04 Thread Martijn van Steenbergen
Andrew Coppin wrote: It seems that the correct course of action is to design a DSL for declaratively describing animated line art. Does anybody have ideas about what such a thing might look like? You could take a look at Fran [1] and Yampa [2] which both seem to do animations in Haskell.

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-04 Thread Ganesh Sittampalam
Hi, That sounds like it might be quite useful. What I'm doing is generating some predicates that involve addition/subtraction/comparison of integers and concatenation/comparison of lists of some abstract thing, and then trying to simplify them. An example would be simplifying \exists

[Haskell-cafe] How to define Show [MyType] ?

2008-12-04 Thread Dmitri O.Kondratiev
I am trying to define instance Show[MyType] so show (x:xs :: MyType) would return a single string where substrings corresponding to list elements will be separated by \n. This would allow pretty printing of MyType list in several lines instead of one, as default Show does for lists. For example:

Re: [Haskell-cafe] How to define Show [MyType] ?

2008-12-04 Thread Martijn van Steenbergen
Dmitri O.Kondratiev wrote: -- How to define Show [MyType] ? Define instance Show MyType and implement not only show (for 1 value of MyType) but also showList, which Show provides as well. You can do all the magic in there. HTH, Martijn. ___

Re: [Haskell-cafe] How to define Show [MyType] ?

2008-12-04 Thread Jonathan Cast
On Fri, 2008-12-05 at 01:27 +0300, Dmitri O.Kondratiev wrote: I am trying to define instance Show[MyType] so show (x:xs :: MyType) would return a single string where substrings corresponding to list elements will be separated by \n. This would allow pretty printing of MyType list in several

Re: [Haskell-cafe] How to define Show [MyType] ?

2008-12-04 Thread Ryan Ingram
If you really, really wanted to define Show [ShipInfo], then putting {-# LANGUAGE FlexibleInstances, OverlappingInstances #-} at the beginning of your file would work. At the cost of using overlapping instances, of course. And at the cost of causing code like this: f :: Show a = [a] -

Re: [Haskell-cafe] How to define Show [MyType] ?

2008-12-04 Thread Jonathan Cast
On Thu, 2008-12-04 at 14:46 -0800, Ryan Ingram wrote: If you really, really wanted to define Show [ShipInfo], then putting {-# LANGUAGE FlexibleInstances, OverlappingInstances #-} at the beginning of your file would work. At the cost of using overlapping instances, of course. And

[Haskell-cafe] two type-level programming questions

2008-12-04 Thread Nicolas Frisby
1) Type families, associated types, synonyms... can anything replace the use of TypeCast for explicit instance selection? Section 2, bullet 4 of http://www.haskell.org/haskellwiki/GHC/AdvancedOverlap indicates a negative response. Any other ideas? 2) Any progress/options for kind polymorphism in

Re: [Haskell-cafe] two type-level programming questions

2008-12-04 Thread Ryan Ingram
Sort of. I believe you can use type equality constraints to replace the use of TypeCast; that is, in any code that looks like: instance TypeCast a HTrue = ... you can write instance (a ~ HTrue) = ... (at least, it has worked for me that way) This at least makes me feel a bit more monadic

[Haskell-cafe] detecting socket closure in haskell

2008-12-04 Thread Tim Docker
This is a haskell + networking question... I have a multi threaded haskell server, which accepts client connections, processes their requests, and returns results. It currently works as desired, except where a client drops a connection whilst the server is processing a request. In this

RE: [Haskell-cafe] Animated line art

2008-12-04 Thread Tim Docker
It seems that the correct course of action is to design a DSL for declaratively describing animated line art. Does anybody have ideas about what such a thing might look like? Someone else already mentioned FRAN and it's ilk. But perhaps you don't need something that fancy. If you implement your

[Haskell-cafe] class method name scope

2008-12-04 Thread Jason Dusek
What proposals are out there to address the issue of scoping class methods? I always feel I must be careful, when exposing a class definition that I want clients to be able to extend, that I mustn't step on the namespace with semantically appropriate but overly general names (e.g.

Re: [Haskell-cafe] detecting socket closure in haskell

2008-12-04 Thread Martijn van Steenbergen
Tim Docker wrote: One way of doing this would would be to maintain a separate thread that is always reading from the client, and buffers until the main thread needs the information. Whilst this would detect the remote close, it also would potentially consume large amounts of memory to maintain

Re: [Haskell-cafe] class method name scope

2008-12-04 Thread Luke Palmer
I have never run into such an issue. Typically classes tend to have the smallest possible basis of methods. I would consider a class with more than about 10 or 15 methods (including superclasses' methods) to indicate poor design. That is just a rough heuristic. But you're right, it would be

Re: [Haskell-cafe] class method name scope

2008-12-04 Thread Jason Dusek
It's not that I like to have a lot of methods in a class, but rather a lot of classes. -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Animated line art

2008-12-04 Thread Dan Weston
Andrew, I can think of several reasons why simple time-indexed animation may be a bad idea. Some important aspects of animation are usually: 1) A main use case is playback, where time change is continuous and monotonic. 2) Differential action is often much cheaper than time jumping (i.e.

Re: [Haskell-cafe] class method name scope

2008-12-04 Thread Luke Palmer
No deep inheritance? Then what's the problem? module X where class Foo a where foo :: a - String module Y where class Foo' a where foo :: a - String module Main where import qualified X import qualified Y instance X.Foo Int where foo _ = X instance Y.Foo' Int where foo _ = Y It is known that

Re: [Haskell-cafe] detecting socket closure in haskell

2008-12-04 Thread Donn Cave
Quoth Tim Docker [EMAIL PROTECTED]: | Hence I seem to need a means of detecting that a socket has been closed | remotely, without actually reading from it. . Does anyone know how to do | this? One reference I've found is this: | | http://stefan.buettcher.org/cs/conn_closed.html | | Apparently

Re: [Haskell-cafe] class method name scope

2008-12-04 Thread Jason Dusek
Oh! Then there is no problem, after all. -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-04 Thread Immanuel Normann
Hi, you can browse my code here.http://trac.informatik.uni-bremen.de:8080/hets/browser/trunk/Search/CommonIt has become part of Hets http://www.dfki.de/sks/hets the Heterogeneous Tool Set which is a parsing, static analysis and proof management tool combining various tools for different

Re: [Haskell-cafe] Animated line art

2008-12-04 Thread Ben Lippmeier
On 05/12/2008, at 10:46 AM, Tim Docker wrote: Someone else already mentioned FRAN and it's ilk. But perhaps you don't need something that fancy. If you implement your drawing logic as a function from time to the appropriate render actions, ie | import qualified Graphics.Rendering.Cairo as

Re: [Haskell-cafe] two type-level programming questions

2008-12-04 Thread Jason Dusek
More monadic? -- _jsn ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Finall Call For Papers (DSL WC)

2008-12-04 Thread Emir Pasalic
*** IFIP Working Conference on Domain Specific Languages (DSL WC) *** July 15-17, 2009, Oxford http://www.hope.cs.rice.edu/twiki/bin/view/WG211/DSLWC * Call for Papers Domain-specific languages are emerging as a fundamental component of software engineering practice. DSLs are often

[Haskell-cafe] Could FDs help usurp an ATs syntactic restriction?

2008-12-04 Thread Nicolas Frisby
From the error below, I'm inferring that the RHS of the associated type definition can only contain type variables from the instance head, not the instance context. I didn't explicitly see this restriction when reading the GHC/Type_families entry. Could perhaps the a b - bn functional dependency

[Haskell-cafe] Hat cannot use with ghc 6.10?

2008-12-04 Thread Magicloud
Hi, I want to do some tracing, and I thought hat could help. Well hmake and hat both could not been made with ghc 6.10 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] propogation of Error

2008-12-04 Thread brad clawsie
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi. i have a partial library for parsing ogg files here: http://hpaste.org/12705 i have a question about an aspect of the code. in the function checkHeader there are a sequence of functions to check various elements in the header of a ogg file.

Re: [Haskell-cafe] Fun with type functions

2008-12-04 Thread Conrad Parker
2008/11/27 Simon Peyton-Jones [EMAIL PROTECTED]: can you tell us about the most persuasive, fun application you've encountered, for type families or functional dependencies? Hi, I certainly had fun with the Instant Insanity puzzle, in Monad.Reader issue 8:

Re: [Haskell-cafe] manipulating predicate formulae

2008-12-04 Thread Ganesh Sittampalam
Thanks - I'll take a look. One pre-emptive question: if I want to use it, it'd be more convenient, though not insurmountable, if that code was BSD3-licenced, since it will fit in better with the licence for camp http://projects.haskell.org/camp, which I might eventually want to integrate my

Re: [Haskell-cafe] two type-level programming questions

2008-12-04 Thread Ryan Ingram
See slide 40 of Weaing the Hair Shirt: A Retrospective on Haskell, Simon Peyton-Jones, POPL 2003 http://research.microsoft.com/Users/simonpj/papers/haskell-retrospective/index.htm -- ryan On Thu, Dec 4, 2008 at 7:04 PM, Jason Dusek [EMAIL PROTECTED] wrote: More monadic? -- _jsn