Re: [Haskell-cafe] Please tell me this function exists

2008-12-17 Thread Bas van Dijk
On Wed, Dec 17, 2008 at 7:36 PM, Brian Hurt bh...@spnz.org wrote: I know it's not hard to write, but still: concat :: String - [String] - String concat _ [] = concat _ [x] = x concat sep x:xs = x ++ sep ++ (concat sep xs) I've got to be stupid and missing it in the standard libraries.

Re: [Haskell-cafe] foldl vs foldl'

2008-11-04 Thread Bas van Dijk
2008/11/5 Daryoush Mehrtash [EMAIL PROTECTED]: Are there cases (function or list) where the result of foldl (or foldr)would be different that foldl' (or foldr')? Maybe this wiki article I wrote some time ago will answer your question: http://haskell.org/haskellwiki/Foldr_Foldl_Foldl' regards,

Re: [Haskell-cafe] foldl vs foldl'

2008-11-04 Thread Bas van Dijk
On Wed, Nov 5, 2008 at 12:43 AM, Bas van Dijk [EMAIL PROTECTED] wrote: 2008/11/5 Daryoush Mehrtash [EMAIL PROTECTED]: Are there cases (function or list) where the result of foldl (or foldr)would be different that foldl' (or foldr')? Maybe this wiki article I wrote some time ago will answer

Re: [Haskell-cafe] Class Quantification

2008-10-01 Thread Bas van Dijk
://homepages.cwi.nl/~ralf/syb3/ Sections 3.2 and 4.1 On Wed, Oct 1, 2008 at 9:01 AM, Bas van Dijk [EMAIL PROTECTED] wrote: On Tue, Sep 30, 2008 at 11:25 PM, Sean Leather [EMAIL PROTECTED] wrote: But perhaps you're looking for potentially unknown classes? Yes indeed. Thanks, Bas

[Haskell-cafe] Class Quantification

2008-09-30 Thread Bas van Dijk
Hello, I was writing some Haskell when I stumbled on the following problem: With the following language extension... {-# LANGUAGE RankNTypes #-} ... it's possible to define 'foo' and 'bar' like so: foo :: (Num c, Num d) = (forall b. Num b = a - b) - a - (c, d) foo f x = (f x, f x) bar ::

Re: [Haskell-cafe] Class Quantification

2008-09-30 Thread Bas van Dijk
On Tue, Sep 30, 2008 at 11:25 PM, Sean Leather [EMAIL PROTECTED] wrote: But perhaps you're looking for potentially unknown classes? Yes indeed. Thanks, Bas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] how do i use quickcheck in the IO monad?

2008-09-23 Thread Bas van Dijk
On Mon, Sep 22, 2008 at 9:35 PM, Anatoly Yakovenko [EMAIL PROTECTED] wrote: If i have functions in the IO monad, is there a way to use quickcheck to test them? Maybe you can use Test.QuickCheck.Monadic in QuickCheck 2.1. I never used it so I can't explain how it works. However there are some

Re: [Haskell-cafe] ANN: benchpress 0.2.1

2008-08-19 Thread Bas van Dijk
On Tue, Aug 19, 2008 at 8:49 AM, Johan Tibell [EMAIL PROTECTED] wrote: benchpress is a micro-benchmark library that produces statistics such as min, mean, standard deviation, median, and max execution time. It also computes execution time percentiles. Nice, I'm certainty going to use this.

Re: [Haskell-cafe] ANN: benchpress 0.2.1

2008-08-19 Thread Bas van Dijk
On Tue, Aug 19, 2008 at 10:54 AM, Johan Tibell [EMAIL PROTECTED] wrote: I will ponder how to best expose this in the interface. Nice I might have to run the action twice to avoid extra measuring overhead. I don't think it matters because the extra measuring overhead is constant over the

[Haskell-cafe] Question about abstraction

2008-07-02 Thread Bas van Dijk
-rank polymorphism but I -- don't see how)? -- Thanks, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type constraints for class instances

2008-03-21 Thread Bas van Dijk
2008/3/21 Krzysztof Skrzętnicki [EMAIL PROTECTED]: ... I'd like to write the following code: instance (Ord a) = YOrd a where ycmp x y = case x `compare` y of LT - (x,y) GT - (y,x) EQ - (x,y) But i get an error Undecidable

Re: [Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-12 Thread Bas van Dijk
2008/3/10 Roman Cheplyaka [EMAIL PROTECTED]: I'm looking for interesting project to work on during Google Summer of Code. So I found [1]A data parallel physics engine ticket and got excited about it. I'd like to know interested mentors and community opinion about the complexity of such

Re: [Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-12 Thread Bas van Dijk
On Wed, Mar 12, 2008 at 10:27 PM, Don Stewart [EMAIL PROTECTED] wrote: Note there's already a project at UNSW, with a PhD student attached, doing an nvidia CUDA backend to Data Parallel Haskell. Great, do you perhaps have a link to a page describing that project? Then I can link to it from

Re: [Haskell-cafe] Wrong kind when attempting to build a monad for a circular list of functions

2008-02-28 Thread Bas van Dijk
On Thu, Feb 28, 2008 at 8:28 AM, Aaron Altman [EMAIL PROTECTED] wrote: I am working on an AI agent that will perform a finite series of actions before starting the sequence over again. I figured a circular list of functions that shifts as you apply them would be the way to do it... I think

Re: [Haskell-cafe] Inverting a Monad

2008-02-09 Thread Bas van Dijk
On Feb 7, 2008 4:58 AM, David Menendez [EMAIL PROTECTED] wrote: If you're doing any kind of backtracking or non-determinism, you might consider the msplit operation defined in Backtracking, Interleaving, and Terminating Monad Transformers http://okmij.org/ftp/Computation/monads.html#LogicT.

[Haskell-cafe] Inverting a Monad

2008-02-06 Thread Bas van Dijk
Hello, Is there a way to 'invert' an arbitrary Monad? By 'inverting' I mean to turn success into failure and failure into success. Here are some specific inversions of the Maybe and List Monad: invM :: Maybe a - Maybe () invM Nothing = Just () invM (Just _) = Nothing invL :: [] a - [] () invL

Re: [Haskell-cafe] Inverting a Monad

2008-02-06 Thread Bas van Dijk
On Feb 6, 2008 12:39 PM, Miguel Mitrofanov [EMAIL PROTECTED] wrote: invM :: Maybe a - Maybe () invM Nothing = Just () invM (Just _) = Nothing invL :: [] a - [] () invL []= [()] invL (_:_) = [] How can I define this for an arbitrary Monad m? Such as Identity? Well in:

Re: [Haskell-cafe] Inverting a Monad

2008-02-06 Thread Bas van Dijk
On Feb 6, 2008 12:50 PM, Miguel Mitrofanov [EMAIL PROTECTED] wrote: class Monad m = MonadInv m where inv :: m a - m () With this constraint you certainly can have your inv. Yes indeed. But I was kind of hoping that I could use standard Haskell classes without adding my own. (BTW I would like

Re: [Haskell-cafe] Inverting a Monad

2008-02-06 Thread Bas van Dijk
On Feb 6, 2008 12:45 PM, Felipe Lessa [EMAIL PROTECTED] wrote: I guess your parser is a monad transformer, so *maybe* the solution is to require MonadError from the inner monad. Indeed my parser 'P t m a' is a monad transformer. I will try out requiring 'm' to have a 'MonadError' constraint

Re: [Haskell-cafe] Inverting a Monad

2008-02-06 Thread Bas van Dijk
On Feb 6, 2008 1:49 PM, Lutz Donnerhacke [EMAIL PROTECTED] wrote: inv m = if m == mzero then return () else mzero `asTypeOf` m Interesting! :t inv inv :: (MonadPlus m, Eq (m ())) = m () - m () The 'Eq' constraint on 'm ()' is a bit problemetic I think in case 'm' is a function like a

Re: [Haskell-cafe] Inverting a Monad

2008-02-06 Thread Bas van Dijk
On Feb 6, 2008 12:51 PM, Bas van Dijk [EMAIL PROTECTED] wrote: I will try out requiring 'm' to have a 'MonadError' constraint and see how far I come with that. I'm now trying to define 'inv' using 'catchError` but I can't get it to work. The following obviously doesn't work: import

Re: [Haskell-cafe] Inverting a Monad

2008-02-06 Thread Bas van Dijk
On Feb 6, 2008 8:27 PM, Tillmann Rendel [EMAIL PROTECTED] wrote: What about this? inv :: MonadError e m = m a - m () inv m = join $ (m return mzero) `catchError` \_ - return (return ()) Beautiful! That's the one I'm looking for! I was already defining a 'MonadInvert' class and a bunch of

Re: [Haskell-cafe] parsec3 pre-release [attempt 2]

2008-02-06 Thread Bas van Dijk
Probably a weird idea but could this be useful? class (Monad m) = Stream s m t | s - t where uncons :: s - m (m (t,s)) for example: instance (Monad m) = Stream [t] m t where uncons [] = return $ fail uncons [] uncons (t:ts) = return $ return (t,ts) One small advantage is that

Re: [Haskell] Nested guards?

2007-12-06 Thread Bas van Dijk
On Dec 6, 2007 9:06 AM, Simon Peyton-Jones [EMAIL PROTECTED] wrote: b) the Clean manual says: To ensure that at least one of the alternatives of a nested guard will be successful, a nested guarded alternative must always have a 'default case' as last alternative. That's a pity. The main

Re: [Haskell-cafe] using an external application

2007-11-02 Thread Bas van Dijk
, it is possible to easily run shell commands, capture their output or provide their input, and pipe them to and from other shell commands and arbitrary Haskell functions at will. http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HSH-1.2.4 regards, Bas van Dijk

Re: [Haskell-cafe] Slightly off-topic

2007-11-02 Thread Bas van Dijk
on: http://www.cs.ru.nl/~freek/courses/tt-2007 regards, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] A possibly stupid doubt about the GHC's overlapping instances flag's

2007-10-24 Thread Bas van Dijk
[only replying to haskell-cafe] On 10/20/07, Rodrigo Geraldo [EMAIL PROTECTED] wrote: Hi! Suppose that the GHC's flag -fallow-incoherent-instances is enabled. In this situation, when a instance will be rejected? And if the flag -fallow-overlapping-instances is enabled. When a instance will

Re: [Haskell-cafe] A possibly stupid doubt about the GHC's overlapping instances flag's

2007-10-24 Thread Bas van Dijk
On 10/24/07, Daniel Fischer [EMAIL PROTECTED] wrote: This seems to be a typo. g = f ([1,2,3] :: [Int]) is accepted. Oops, a typo it is! Bas. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: runhaskell rather than runghc

2007-09-30 Thread Bas van Dijk
On 9/30/07, Serge D. Mechveliani [EMAIL PROTECTED] wrote: Dear GHC and Cabal developers and users, I suggest to use `runhaskell' rather than `runghc'. Because it looks to have more sense, and also for political correctness. Cabal is a tool for `making' various Haskell implementations. In

Re: [Haskell-cafe] 'data' syntax - a suggestion

2007-09-28 Thread Bas van Dijk
a 'Expr' is a bit verbose because of the 'In' newtype constructors. regards, Bas van Dijk [1] http://citeseer.ist.psu.edu/293490.html ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Newb question about map and a list of lists

2007-09-28 Thread Bas van Dijk
On 9/28/07, Chuk Goodin [EMAIL PROTECTED] wrote: I have a list of lists of pairs of numeric Strings (like this: [[2,3],[1,2],[13,14]] etc.) I'd like to change it into a list of a list of numbers... Now that you know (map . map) which Jonathan explained you need to apply that to a function that

Re: [Haskell-cafe] Opengl and Haskell GLdouble/GLfloat vs. Double/Float

2007-09-28 Thread Bas van Dijk
On 9/28/07, Jules Bean [EMAIL PROTECTED] wrote: Certainly GLfloat, GLdouble, GLint are members of all the type classes you would hope them to be and they are no less convenient to use. And so, if you need it, you can always coerce between the GL and the standard Haskell types by using the

Re: [Haskell-cafe] Complexity question

2007-09-24 Thread Bas van Dijk
On 9/24/07, Andrew Coppin [EMAIL PROTECTED] wrote: Anybody happen to know what the time complexity of transpose is? Looking at the definition of 'transpose' in: http://darcs.haskell.org/libraries/base/Data/List.hs: transpose :: [[a]] - [[a]] transpose [] = [] transpose

Re: [Haskell-cafe] Spot the difference!

2007-09-20 Thread Bas van Dijk
function should be applied to the argument 'n_a79'. Because '+' is overloaded the same thing happens as we saw with the overloaded literal '1'. Now that you can read GHC Core programs :-) you can observe that 'foo' and 'bar' are the same. regards, Bas van Dijk [1] http://www.haskell.org/ghc/dist

Unknown option -XPatternSig used in warning

2007-09-19 Thread Bas van Dijk
`a' unless the pattern has a rigid type context In the pattern: x :: a In the definition of `foo': foo (x :: a) = x Which I expect. Should I file a bug report, or is there an easy fix? regards, Bas van Dijk ___ Glasgow-haskell-users

Re: Unknown option -XPatternSig used in warning

2007-09-19 Thread Bas van Dijk
On 9/19/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote: I believe this is a known problem with OPTIONS_GHC, and will work on the command line. I think Ian is working on it. Ian? Via the command line I get the same problem: $ ghci -XPatternSigs PatternSig.hs GHCi, version 6.7.20070915:

Re: Unknown option -XPatternSig used in warning

2007-09-19 Thread Bas van Dijk
On 9/19/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote: ...I'll push a fix. Thanks! It works now: $ ghci -XPatternSignatures PatternSig.hs GHCi, version 6.9.20070919: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. [1 of 1] Compiling Main (

Re: Unknown option -XPatternSig used in warning

2007-09-19 Thread Bas van Dijk
On 9/19/07, Wolfgang Jeltsch [EMAIL PROTECTED] wrote: You should use {-# LANGUAGE PatternSigs #-} That should be: {-# LANGUAGE PatternSignatures #-} It would indeed be better if GHC could print Use LANGUAGE pragma with extension... like Wolfram mentioned. Bas

[Haskell-cafe] Re: [Haskell] Functor ((,) a)

2007-09-19 Thread Bas van Dijk
On 9/19/07, Janis Voigtlaender [EMAIL PROTECTED] wrote: BTW, what would have been the easiest way for me to find this out on my own? The following is probably not the easiest way: I keep a copy of the sources of GHC and the libraries [1] on my disk. When I want to search for something I simply

Re: [Haskell-cafe] Why isn't pattern matching lazy by default?

2007-09-19 Thread Bas van Dijk
On 9/19/07, Roberto Zunino [EMAIL PROTECTED] wrote: Henning Thielemann wrote: Then why are patterns in lambdas not lazy? Because they should allow for more branches! ;-)) null = \ [] - True _ - False See http://hackage.haskell.org/trac/haskell-prime/ticket/114 for a relevant

Re: [Haskell-cafe] Re: Type-Marking finite/infinte lists?

2007-09-18 Thread Bas van Dijk
On 9/18/07, apfelmus [EMAIL PROTECTED] wrote: ...in reality, foldr is (almost) the induction principle for natural numbers! Oh yes, nice observation! Afpelmus, thanks for your thorough answers! regards, Bas ___ Haskell-Cafe mailing list

Re: [Haskell] Swapping parameters and type classes

2007-09-17 Thread Bas van Dijk
correct terms. Bas van Dijk: On 9/16/07, Mads Lindstrøm [EMAIL PROTECTED] wrote: But what if I want to apply the 'b' ? How do I do that ? The following uses type families (functions) and compiles under GHC HEAD: {-# OPTIONS_GHC -XTypeFamilies -XEmptyDataDecls -XTypeSynonymInstances

Re: [Haskell] Re: ANN: ListLike, a generic interface over list-like structures

2007-09-17 Thread Bas van Dijk
On 9/17/07, John Goerzen [EMAIL PROTECTED] wrote: That does show one annoying property of typeclasses: instances too easily appear and are impossible to replace. The problem would be solved if it was possible to explicitly import and export instance declarations. I asked this before [1] but I

[Haskell-cafe] Re: [Haskell] Swapping parameters and type classes

2007-09-17 Thread Bas van Dijk
On 9/16/07, Mads Lindstrøm [EMAIL PROTECTED] wrote: Hi all If I have this type: data Foo a b = ... and this class class Bar (x :: * - *) where ... I can imagine two ways to make Foo an instance of Bar. Either I must apply the 'a' or the 'b' in (Foo a b). Otherwise it will not have

Re: [Haskell-cafe] Re: Type-Marking finite/infinte lists?

2007-09-17 Thread Bas van Dijk
On 9/17/07, Roberto Zunino [EMAIL PROTECTED] wrote: I thought this was possible with GADTs (is it?): data Z data S n data List a len where Nil :: List a Z Cons:: a - List a len - List a (S len) Slightly related: The other day I was playing with exactly this GADT. See:

Re: [Haskell] Swapping parameters and type classes

2007-09-16 Thread Bas van Dijk
:: * - *) instance Bar (Foo a) type family BarB a b :: * - * type instance BarB a b = Foo b instance Bar (BarB a b) regards, Bas van Dijk ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell] Swapping parameters and type classes

2007-09-16 Thread Bas van Dijk
On 9/16/07, Bas van Dijk [EMAIL PROTECTED] wrote: The following uses type families (functions) and compiles under GHC HEAD: ... Oops this is not correct! Its getting late... oh well Bas ___ Haskell mailing list Haskell@haskell.org http

Re: [Haskell-cafe] Serial Communications in Haskell

2007-08-29 Thread Bas van Dijk
would have something like pyserial ( http://pyserial.sourceforge.net ) for Haskell. It provides a nice portable abstraction over serial communication. See for example the windows binding: http://pyserial.cvs.sourceforge.net/pyserial/pyserial/serial/serialwin32.py?view=markup regards, Bas van

Re: [Haskell-cafe] quoting in Haskell

2007-08-27 Thread Bas van Dijk
new code and splice that in, while the compiler is compiling your module. However I don't know if your 'selectiveQuote' is possible using TH. regards, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] quoting in Haskell

2007-08-27 Thread Bas van Dijk
On 8/27/07, Derek Elkins [EMAIL PROTECTED] wrote: ...Really, it's not all that appropriate a name anyway... Indeed, Meta Haskell would be better I think. Bas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Newbie question: Where is StackOverflow on the Wiki?

2007-08-23 Thread Bas van Dijk
On 8/20/07, Stefan O'Rear [EMAIL PROTECTED] wrote: ... (I need to find some way to automate making these trails :) ) ... I think you can come a long way with the debugger in GHC HEAD. It provides a :trace command that, when applied to an expression with some breakpoint in it, remembers the

Re: [Haskell-cafe] Converting Emacs syntax coloured Haskell code to HTML

2007-08-14 Thread Bas van Dijk
On 8/14/07, Peter Verswyvelen [EMAIL PROTECTED] wrote: I noticed many code snippets on the wiki that have syntax colouring. How is this done? Can I convert syntax coloured code from Emacs to HTML? Look at HsColour: http://www.cs.york.ac.uk/fp/darcs/hscolour/ regards, Bas van Dijk

Re: [Haskell-cafe] Bathroom reading

2007-08-14 Thread Bas van Dijk
://www.haskell.org/haskellwiki/Blow_your_mind and: http://haskell.org/haskellwiki/Research_papers/Functional_pearls regards, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell] Power series in a nutshell

2007-07-17 Thread Bas van Dijk
where fromList :: [a] - b GHC HEAD has support for overloaded String literals. See: http://haskell.org/ghc/dist/current/docs/users_guide/other-type-extensions.html#overloaded-strings regards, Bas van Dijk ___ Haskell mailing list Haskell@haskell.org

Re: [Haskell-cafe] Haskell shootout game

2007-07-16 Thread Bas van Dijk
This would be a lot of fun! Make sure to take the lessons from http://haskell.org/haskellwiki/Safely_running_untrusted_Haskell_code into account. regards, Bas van Dijk On 7/15/07, Hugh Perkins [EMAIL PROTECTED] wrote: Had an idea: a real shootout game for Haskell. The way it would work

Re: [Haskell] Newbie help with type-classes

2007-05-11 Thread Bas van Dijk
Add: -fallow-overlapping-instances to your OPTIONS pragma and read about overlapping instances in the GHC User Guide: http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#instance-overlap regards, Bas van Dijk On 5/11/07, Ryan Ingram [EMAIL PROTECTED] wrote: Here's

Re: [Haskell] Newbie help with type-classes

2007-05-11 Thread Bas van Dijk
Maybe this is not what you want, but you can also put the 'convl' function in the 'ConvertToInt' class. class ConvertToInt a where conv :: a - Int convl :: [a] - [Int] With this approach you don't need any language extension. regards, Bas van Dijk On 5/11/07, Ryan Ingram [EMAIL

Re: [Haskell] ANNOUNCE: Harpy -- run-time code generation library

2007-05-11 Thread Bas van Dijk
of that technique is that you don't have to create a bunch of labels at the start of your assembly-program. You just define them at the place where you need them. Using recursive do notation you can even reference (jmp) to labels _before_ you define them! Thanks, Bas van Dijk On 5/11/07, Dirk Kleeblatt [EMAIL

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

2007-05-10 Thread Bas van Dijk
, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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

2007-05-10 Thread Bas van Dijk
There's also documentation about rewrite rules on the Haskell en GHC wikis: http://haskell.org/haskellwiki/Playing_by_the_rules http://hackage.haskell.org/trac/ghc/wiki/RewriteRules Bas On 5/10/07, Bas van Dijk [EMAIL PROTECTED] wrote: On 5/9/07, Jason Morton [EMAIL PROTECTED] wrote: I'd

Re: Error compiling GHC/Num.lhs

2007-05-03 Thread Bas van Dijk
-linux): mkWWcpr: not a product base:Data.Typeable.TypeRep{tc r3eN} What can be the problem? regards, Bas van Dijk ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Error compiling GHC/Num.lhs

2007-05-03 Thread Bas van Dijk
On 5/3/07, Simon Peyton-Jones [EMAIL PROTECTED] wrote: I think I have fixed it... You did, thanks very much! GHC now builds and install without any errors, jippy! Thanks, Bas van Dijk ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

Re: Error compiling GHC/Num.lhs

2007-05-02 Thread Bas van Dijk
) :ghc make[2]: *** [stage2/main/GHC.o] Error 1 make[2]: Leaving directory `/home/bas/development/haskell/ghc/compiler' make[1]: *** [stage2] Error 2 make[1]: Leaving directory `/home/bas/development/haskell/ghc' make: *** [bootstrap2] Error 2 regards, Bas van Dijk

Re: Error compiling GHC/Num.lhs

2007-05-02 Thread Bas van Dijk
or isn't a directory (use --force to override) make[1]: *** [install.library.base] Error 1 make: *** [install] Error 1 The directory: /home/bas/lib/base-2.1/ghc-6.7.20070502/include indeed does not exists. What can be the problem? regards, Bas van Dijk

Re: Error compiling GHC/Num.lhs

2007-05-01 Thread Bas van Dijk
On 4/29/07, Ian Lynagh [EMAIL PROTECTED] wrote: Hi Bas, On Sun, Apr 29, 2007 at 11:54:35AM +, Bas van Dijk wrote: I'm trying to build GHC from darcs. Unfortunately compilation fails with the following error: ... cpphs: #error Please define LEFTMOST_BIT to be 2^(SIZEOF_HSWORD*8-1

Re: [Haskell] Haskell fast (?) arrays

2007-05-01 Thread Bas van Dijk
On 5/1/07, Federico Squartini [EMAIL PROTECTED] wrote: Moreover there is not much literature on high performance Haskell programming (tricks like unsafeWrite), at least organized in a systematic and concise way. Look at: http://haskell.org/haskellwiki/Performance regards, Bas van Dijk

Error compiling GHC/Num.lhs

2007-04-29 Thread Bas van Dijk
that ^ is not available yet. #endif ... Note that in build.mk I set BuildFlavour = quick and I also tried building it with the following options added: SRC_HC_OPTS += -optc-march=athlon64 -opta-march=athlon64 SRC_CC_OPTS += -march=athlon64 What can be the problem? Thanks, Bas van Dijk Some info on my system

Re: [Haskell-cafe] Multi Line String literals

2007-04-27 Thread Bas van Dijk
? Thanks, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Multi Line String literals

2007-04-26 Thread Bas van Dijk
Hello, Just for fun I'm trying to define multi line string literals. I have the following code and I'm wondering if it can be improved (understandability, elegance, performance): http://hpaste.org/1582 (look at the second annotation) regards, Bas van Dijk

Re: [Haskell-cafe] Weaving fun

2007-04-13 Thread Bas van Dijk
f (x:xs) g = \rst acc - g (xs:rst) (x:acc) Thanks, Bas van Dijk ___ Haskell-Cafe mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type checking with Haskell

2007-04-12 Thread Bas van Dijk
with much less language constructs than in the original program. The disadvantage is that after desugaring a lot of the original program is lost so that the type checker can't give an error message that exactly describes the location and reason of the error. Bas van Dijk

[Haskell-cafe] Re: Weaving fun

2007-04-11 Thread Bas van Dijk
Thanks for all the wonderful solutions. I put them into one module so other people can try it out: http://hpaste.org/1338 Thanks, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Weaving fun

2007-04-10 Thread Bas van Dijk
to the 'reverse' parts (how do they impact performance and can they be removed?) So I'm wondering if 'weave' can be defined more elegantly (better readable, shorter, more efficient, etc.)? happy hacking, Bas van Dijk ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Re: Yi pre-release

2007-04-08 Thread Bas van Dijk
Thanks, I've managed to make yi. However when I try to make an interface: $ make yi-vty make complains: ... setup: cannot satisfy dependency filepath=1.0 ... Where can I find a filepath=1.0? The one I have from Neil Mitchell is version 0.11. regards, Bas van Dijk

Re: [Haskell-cafe] Re: Yi pre-release

2007-04-08 Thread Bas van Dijk
On 4/8/07, Jean-Philippe Bernardy [EMAIL PROTECTED] wrote: You want filepath from http://darcs.haskell.org/packages/filepath/ Thanks, I got it working now. Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Yi pre-release

2007-04-07 Thread Bas van Dijk
-0.2, haskelldb-0.10, haskelldb-hsql-0.10, haskelldb-hsql-mysql-0.10 but the error remains... What can be the problem? regards, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Duplicate instance declaration

2007-03-23 Thread Bas van Dijk
On 3/22/07, Twan van Laarhoven [EMAIL PROTECTED] wrote: ... An alternative idea would be to use data types instead of classes for the registers and memory locations ... A very nice solution. Thanks very much! Bas van Dijk ___ Haskell-Cafe mailing

[Haskell-cafe] Duplicate instance declaration

2007-03-22 Thread Bas van Dijk
this is happening and if there's a way to fix it. Thanks in advance, Bas van Dijk [1] The Monad.Reader Issue 6, Russel O' Conner, Assembly: Circular Programming with Recursive do, http://haskell.org/sitewiki/images/1/14/TMR-Issue6.pdf \begin{code} {-# OPTIONS_GHC -fglasgow-exts -fallow-undecidable

Re: [Haskell-cafe] SYB vs HList (again)

2007-03-15 Thread Bas van Dijk
had to deal with default values to model SQL attributes that can contain NULL values. Regards, Bas van Dijk. Offtopic: I'm trying to use CoddFish in a HAppS application I'm developing but I can't get it to compile under ghc-6.6 :-( ___ Haskell-Cafe

Re: [Haskell-cafe] wanted: haskell one-liners (in the perl sense of one-liners)

2007-03-02 Thread Bas van Dijk
on how to run Haskell expressions from the shell: http://www.joachim-breitner.de/blog/archives/156-Haskell-on-the-Command-Line.html regards, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: Desugaring overloaded functions

2006-11-08 Thread Bas van Dijk
this into: incL_akH = ... incL_akH ... ? regards, Bas van Dijk ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: Desugaring overloaded functions

2006-11-07 Thread Bas van Dijk
? That's exactly what I want. I tried it and it works perfectly. Thanks very much, Bas van Dijk ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Desugaring overloaded functions

2006-11-06 Thread Bas van Dijk
in advance, Bas van Dijk P.S. I know that applying 'SimplCore.core2core' will result in something that I almost want: [Test.incL :: forall a_ad8. (GHC.Num.Num a_ad8) = [a_ad8] - [a_ad8] Test.incL = \ (@ a_akG) ($dNum_akS :: {GHC.Num.Num a_akG}) - let { lit_akM :: a_akG

Importing and Exporting Instance Declarations

2006-11-01 Thread Bas van Dijk
good reasons why this seemingly very obvious feature is missing. regards, Bas van Dijk ___ Haskell-prime mailing list Haskell-prime@haskell.org http://www.haskell.org/mailman/listinfo/haskell-prime

Re: [Haskell-cafe] Exception: Too many open files

2006-10-24 Thread Bas van Dijk
= print = sequence . take 3 = parseFiles Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Exception: Too many open files

2006-10-23 Thread Bas van Dijk
= ... -- Greetings, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Exception: Too many open files

2006-10-23 Thread Bas van Dijk
. --- Thanks, Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Exception: Too many open files

2006-10-23 Thread Bas van Dijk
On Tuesday 24 October 2006 00:58, Greg Fitzgerald wrote: test = print . take 3 = parseFiles I haven't had time to double-check this code, but something like this ought to work (no 'unsafe' operations!): test = sequence . take 3 . map (print . parseFile) = getFileFPs Let me know how it

Re: Link errors when using the GHC API

2006-10-16 Thread Bas van Dijk
, Cabalzm1zi1zi6_DistributionziPackage_a_closure I see that it is indeed an (U)ndefined symbol. I don't know what that means though. Reemerging GHC or Cabal also doesn't help. Any help is highly appreciated. Greetings, Bas van Dijk. ___ Glasgow-haskell-users

Re: Link errors when using the GHC API

2006-10-16 Thread Bas van Dijk
On Monday 16 October 2006 12:41, Duncan Coutts wrote: This is a problem with the way we have packaged it for Gentoo. We know the source of the problem and will fix it soon. Great, thanks. On Monday 16 October 2006 12:46, Clemens Fruhwirth wrote: The problem is Gentoo specific. Quick dirty

Re: Link errors when using the GHC API

2006-10-16 Thread Bas van Dijk
Yeah. That'd have a different quick fix: cp /usr/lib/ghc-6.6/libHSCabal.a /usr/lib/Cabal-1.1.6/ghc-6.6/ because ghci uses the .o files and ghc uses the .a ones. Thanks it works! Now I can finally start playing with the GHC API. Bas ___

Link errors when using the GHC API

2006-10-11 Thread Bas van Dijk
- I would like to know what is causing this and how I can fix it? Also, should I file a bugreport? Greetings, Bas van Dijk ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http

Re: [Haskell-cafe] A better syntax for qualified operators?

2006-09-27 Thread Bas van Dijk
writing list comprehensions. First I think of the general form of the elements in the list: [ (a, b) ... then I think about the restrictions on the variables: | a - [1..10], b - [1..10], a b] Bas van Dijk ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Either e Monad

2006-09-20 Thread Bas van Dijk
as Right ... Then somehow using sequence to combine the resulting list. But I can't get it to work. It's late now here in Holland (~02:00) and I'm losing my concentration ;-) So I will just ask if somebody knows a shorter version. Thanks, Bas van Dijk

[Haskell] Ambiguous type variable when using Data.Generic

2006-05-20 Thread Bas van Dijk
' at Special.hs:145:25-27 `Simplify b' arising from use of `simplify' at Special.hs:145:29-36 Probable fix: add a type signature that fixes these type variable(s) How can I make this work? Greetings, Bas van Dijk ___ Haskell mailing list Haskell

UML diagrams of Haskell

2003-06-29 Thread Bas van Dijk
Hi, It's maybe a weird question but do there exist UML diagrams of the Haskell language. They don't necessarily have to be UML diagrams, as long as they show the different concepts in the language (i.e.: functions, datatypes, patterns, etc.) and the relations between them(i.e.: a function

Fudgets with GHC 5.04.3

2003-05-29 Thread Bas van Dijk
Hi, Does anybody have the Fudgets library working with GHC 5.04.3 ? I know the library is tested under GHC 5.02 but I would rather not install two versions of GHC. Bas. ___ Haskell mailing list [EMAIL PROTECTED]

Re: Fudgets with GHC 5.04.3

2003-05-29 Thread Bas van Dijk
/lib/ghc-5.04.3/GhcFudgets Thanks, Bas. The Netherlands. P.S. Sorry if this mail shouldn't be posted to the Haskell-Mailinglist... maybe the GHC list? iavor wrote: hi, it works fine with GHC 5.04.3. in fact we are using it for one of our projects here at OGI. bye iavor Bas van Dijk wrote

<    1   2   3   4   5   6