Re: [Haskell-cafe] ghc overlapping instances - solved

2007-12-06 Thread Steffen Mazanek
Hello, Isaac, this works for me. Thx a lot, Steffen 2007/12/5, Isaac Dupree [EMAIL PROTECTED]: Steffen Mazanek wrote: Hi, Stefan and Isaac, thx for providing quick advice. @Stefan: Unfortunately I have to use a list. @Isaac: I do not get it. Could you please provide a short

Re: [Haskell-cafe] ghc overlapping instances

2007-12-05 Thread Steffen Mazanek
::Program main = mapM_ (\(s,a) - putStrLn s a) [(flowchart construct and parse, test prop_ConstructParse)] 2007/12/4, Stefan O'Rear [EMAIL PROTECTED]: On Tue, Dec 04, 2007 at 03:36:20PM +0100, Steffen Mazanek wrote: Hello, I want to quickcheck a property on a datatype representing programs

[Haskell-cafe] ghc overlapping instances

2007-12-04 Thread Steffen Mazanek
Hello, I want to quickcheck a property on a datatype representing programs (=[Stmt]) and need to define a specific instance instance Arbitrary [Stmt] (mainly to restrict the size of the list). In quickcheck an instance Arbitrary of lists is already defined. Which parameters do I have to give

[Haskell-cafe] standard function

2007-06-06 Thread Steffen Mazanek
Hello, is there a function f::[a-b]-a-[b] in the libraries? Couldn't find one using hoogle although this seems to be quite a common thing... Steffen ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: standard function

2007-06-06 Thread Steffen Mazanek
Cool! Haskell surprised me once again :) @Paul: Thank you for pointing me to the old thread. @Neil: Is there a way to let hoogle find this kind of stuff? It would be a quite complex inference though. 2007/6/6, apfelmus [EMAIL PROTECTED]: Steffen Mazanek wrote: is there a function f::[a-b

Re: [Haskell-cafe] Re: CYK-style parsing and laziness

2007-05-26 Thread Steffen Mazanek
Note that there are very systematic and natural ways to derive dynamic programming algorithms in functional languages. In a sense, much of the work of R. Bird centers this topic. The book Algebra of Programming http://web.comlab.ox.ac.uk/oucl/research/pdt/ap/pubs.html#Bird-deMoor96:Algebra

[Haskell-cafe] CYK-style parsing and laziness

2007-05-23 Thread Steffen Mazanek
Hello, I have two questions regarding a Cocke, Younger, Kasami parser. Consider this program: type NT = Char -- Nonterminal type T = Char -- Terminal -- a Chomsky production has either two nonterminals or one terminal on its right-hand side type ChomskyProd = (NT, Either T (NT, NT)) -- a

Re: [Haskell-cafe] Re: CYK-style parsing and laziness

2007-05-23 Thread Steffen Mazanek
Once again thank you apfelmus :-) The key point of the dynamic programming algorithm is indeed to memoize the results gs i j for all pairs of i and j. In other words, the insight that yields a fast algorithm is that for solving the subproblems gs i j (of which there are n^2), solution to

Re: [Haskell-cafe] List algorithm

2007-05-22 Thread Steffen Mazanek
.-Inform. Steffen Mazanek Institut für Softwaretechnologie Fakultät Informatik Universität der Bundeswehr München 85577 Neubiberg Tel: +49 (0)89 6004-2505 Fax: +49 (0)89 6004-4447 E-Mail: [EMAIL PROTECTED] ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] List algorithm

2007-05-21 Thread Steffen Mazanek
Hello, is there an efficient algorithm that takes two positive numbers n and m and that computes all lists l of numbers 0x=n such that sum l = m? For instance alg 5 1 = [[1]] alg 5 2 = [[1,1],[2]] alg 5 3 = [[1,1,1],[1,2],[2,1],[3]] ... I know that filter (\l-sum l == m) (powerSet [1..n])

Re: [Haskell-cafe] Profiling, measuring time

2007-05-20 Thread Steffen Mazanek
Thats it! Thanks a lot. I do not even need forceOutput, because I perform a bottom-up analysis. And the timeline I got looks sooo great (perfect polynomial behavior :-)) Best regards, Steffen 2007/5/20, Matthew Brecknell [EMAIL PROTECTED]: Steffen Mazanek: I have written a function f

[Haskell-cafe] Profiling, measuring time

2007-05-19 Thread Steffen Mazanek
, Steffen -- Dipl.-Inform. Steffen Mazanek Institut für Softwaretechnologie Fakultät Informatik Universität der Bundeswehr München 85577 Neubiberg Tel: +49 (0)89 6004-2505 Fax: +49 (0)89 6004-4447 E-Mail: [EMAIL PROTECTED] ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] generate Haskell code from model

2007-05-10 Thread Steffen Mazanek
love Haskell with a passion - I'm curious whether I love or hate the combination) Thanks Neil On 5/9/07, Steffen Mazanek [EMAIL PROTECTED] wrote: I have done some experiments relating to our discussion. The approach to generate Haskell code from UML class diagrams is not very promising

Re: [Haskell-cafe] generate Haskell code from model

2007-05-09 Thread Steffen Mazanek
-mazanek.de/blog/2007/05/visual-language-howto.html Best regards, Steffen 2007/4/14, Brian Smith [EMAIL PROTECTED]: On 4/14/07, Steffen Mazanek [EMAIL PROTECTED] wrote: Brian, but don't you think that you have to write a lot of boilerplate code in Haskell? I have never felt I was writing

Re: [Haskell-cafe] Tutorial on Haskell

2007-04-16 Thread Steffen Mazanek
___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Dipl.-Inform. Steffen Mazanek Institut für Softwaretechnologie Fakultät Informatik Universität der Bundeswehr München 85577 Neubiberg Tel: +49 (0)89 6004-2505 Fax: +49 (0)89 6004-4447 E

[Haskell-cafe] generate Haskell code from model

2007-04-13 Thread Steffen Mazanek
are well known. Best practices in programming are propagated, for Haskell e.g. use different modules for different things, use the tedious import/export lists, Haddock your code... What are your ideas? Best regards, Steffen -- Dipl.-Inform. Steffen Mazanek Institut für Softwaretechnologie

Re: [Haskell-cafe] generate Haskell code from model

2007-04-13 Thread Steffen Mazanek
have no choice and are not allowed to discuss the sense of this approach :-) How should the code look like? Best regards, Steffen 2007/4/13, Brian Smith [EMAIL PROTECTED]: On 4/13/07, Steffen Mazanek [EMAIL PROTECTED] wrote: Hello everybody, I would like to start a discussion on how

Re: [Haskell-cafe] generate Haskell code from model

2007-04-13 Thread Steffen Mazanek
structures that operate on this data. How would you procede? This is similar to HaXML that helped you to generate Haskell types for an xml schema. Best regards, Steffen -- Dipl.-Inform. Steffen Mazanek Institut für Softwaretechnologie Fakultät Informatik Universität der Bundeswehr München 85577

[Haskell-cafe] Re: [Haskell] Haskell Chess

2007-03-19 Thread Steffen Mazanek
Hello again, first of all, thank you Don for your help in making hsChess accessible. I have to have a look at darcs and cabal first :-) I have added some more content and a discussion page to the wiki, please contribute your thoughts. Furthermore I added a link to the german project and task

Re: [Haskell-cafe] Haskell Chess

2007-03-19 Thread Steffen Mazanek
I originally used a more general approach (probably similar to the one you refer to), but kicked generality out in favor of simplicity. In teaching one should probably just discuss this aspect, but stay with the simple approach (I'll add a note to the wiki page :-)). In contrast, for the real

Re: Problem with Infinite Lists

2003-09-03 Thread Steffen Mazanek
Hello, all_fib :: [Float] You define all_fib to return a list of Float, but even does only work for numbers whose type is an instance of the class Integral, e.g. Int. HTH and ciao, Steffen ___ Haskell-Cafe mailing list [EMAIL PROTECTED]