[Haskell] pre-ANNOUNCE: Generalized LR parsing added to Happy

2004-08-11 Thread P.C.Callaghan
Hello, The CVS version of Happy now includes an extension for GLR parsing. GLR parsing extends LR parsing to ambiguous grammars, producing a directed, acyclic and-or graph ("a packed forest") to compactly represent the multiple possible parses. There are many possible applications, not least natu

Re: [Haskell] Dependent Types in Haskell [was: Eliminating Array Bound Checking through Non-dependent] types

2004-08-11 Thread MR K P SCHUPKE
>This will only work for terminating programs! Interesting point, but thats because all the operations are at the type level - therefore if a type is unknown at compile time we cannot produce a program. With this type class stuff values can depend on types, but not the other way around. You can

[Haskell] Re: Dependent Types in Haskell [was: Eliminating Array Bound Checking through Non-dependent] types

2004-08-11 Thread Conor T McBride
Hi Martin Martin Sulzmann wrote: Hi, Inspired by Conor's and Oleg's discussion let's see which dependent types properties can be expressed in Haskell (and extensions). I use a very simple running example. [..] We'd like to statically guarantee that the sum of the output list is the sum of the two i

Re: [Haskell] Dependent Types in Haskell [was: Eliminating Array Bound Checking through Non-dependent] types

2004-08-11 Thread Martin Sulzmann
The append example is meant to make a general point about the connection between dependent types and Haskell with extensions. I know that the example itself is rather trivial, and DML/index types, Omega, Haskell+GAD and Chameleon might seem as too big canons for a rather small target. > Second

Re: [Haskell] Dependent Types in Haskell [was: Eliminating Array Bound Checking through Non-dependent] types

2004-08-11 Thread MR K P SCHUPKE
Actually the data statement wasnt quite right: data Cons a b = Cons a b Would work, but now there is nothing keeping each element in the list as the same type, I guess we could add a class to constrain to a normal list,,, class List l x instance List Nil x instance List l x => List (Cons x l) x

Re: [Haskell] Dependent Types in Haskell [was: Eliminating Array Bound Checking through Non-dependent] types

2004-08-11 Thread MR K P SCHUPKE
Just a couple of quick points... Why store the length along with the list, the length is stored using type level naturals (Succ | Zero) but these are identical to the recursion pattern in a List (Cons | Nil) - therefore it is no less work than having a length function which converts from one to th

[Haskell] Dependent Types in Haskell [was: Eliminating Array Bound Checking through Non-dependent] types

2004-08-11 Thread Martin Sulzmann
There's a potentially confusing typo. > append Nil ys = Nil should be replaced by append Nil ys = ys Thanks to Ketil for pointing this out. Martin ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/haskell