[Haskell-cafe] Uniplate and rewriting with different types

2013-01-28 Thread Chris Mears
solution (see below), but I am not sure that it is the right approach, and it is probably inefficient. Chris Mears {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE ScopedTypeVariables #-} import Control.Monad import Control.Monad.State import

Re: [Haskell-cafe] Linux binary dist problems

2008-10-05 Thread Chris Mears
Colin Fleming [EMAIL PROTECTED] writes: It looks from the porting guide that I might be able to make 6.6.2 with just a C compiler, can I then use that to build 6.8.3? I have the same problem as you -- a hosting environment with an old libc -- and had the same problem with the binary

Re: [Haskell-cafe] MPFR / FFI - Nefarious (Simple?) bug

2008-10-05 Thread Chris Mears
Jared Updike [EMAIL PROTECTED] writes: Can someone else verify if this is a Mac/BSD only problem by compiling and running my code? (Does the C executableworks work? Does the Haskell executable noworks not work?) Can anyone on Linux and Windows attempt to compile/run and see if you can get the

Re: [Haskell-cafe] is there a way to run tests at compile time using TH

2007-08-26 Thread Chris Mears
Alex Jacobson [EMAIL PROTECTED] writes: I'd like to have code not compile if it doesn't pass the tests. Is there a way to use TH to generate compiler errors if the tests don't pass? What about something like this? import Language.Haskell.TH import Tests -- this should

Re: [Haskell-cafe] Redefining Disjunction

2007-06-13 Thread Chris Mears
PR Stanley [EMAIL PROTECTED] writes: Hi Can you think of a fourth way of redefining disjunct using pattern matching? vee :: Bool - Bool - Bool vee _ True = True vee True _ = True vee _ _ = False In the same spirit: f False False = False f _ _ = True

Re: [Haskell-cafe] Mounting haskell.org wiki under WikipediaFS?

2007-05-06 Thread Chris Mears
[EMAIL PROTECTED] (Donald Bruce Stewart) writes: Anyone tried editing haskell.org's wiki as text, using: http://wikipediafs.sourceforge.net/ I have now, and it works. To test it out, do the following: - install wikipediafs (it's in Debian's repo., and probably others) - $ mkdir wikis

Re: [Haskell-cafe] Weaving fun

2007-04-10 Thread Chris Mears
Bas van Dijk [EMAIL PROTECTED] writes: Hello, For my own exercise I'm writing a function 'weave' that weaves a list of lists together. For example: weave [[1,1,1], [2,2,2], [3,3]] == [1,2,3,1,2,3,1,2] weave [[1,1,1], [2,2], [3,3,3]] == [1,2,3,1,2,3,1] [...] So I'm wondering if 'weave'