Re: [Haskell] simulating dependent types; ghc/ghci discrepancy

2004-04-14 Thread Tomasz Zielonka
On Wed, Apr 14, 2004 at 06:29:38PM +0200, Tomasz Zielonka wrote: > > > > Is it possible to unwrap an existential type in ghci? > > For me this seems to be a bug in GHCi. > I wonder if there a type in Haskell-with-extensions that could be > assigned to x? Probably GHCi could do the same as in thi

Re: [Haskell] simulating dependent types; ghc/ghci discrepancy

2004-04-14 Thread Keith Wansbrough
> > anyway (thus providing the dictionary) there is no point in storing it. > > Aren't you talking about a different declaration? > > data Show a => Show' a = Show' a Yes, I am. Oops, sorry. --KW 8-) -- Keith Wansbrough <[EMAIL PROTECTED]> http://www.cl.cam.ac.uk/users/kw217/ University of

Re: [Haskell] simulating dependent types; ghc/ghci discrepancy

2004-04-14 Thread Tomasz Zielonka
On Wed, Apr 14, 2004 at 10:13:51AM -0400, John D. Barnett wrote: > > *DepTest> :t Show' True > Show' True :: Show' > *DepTest> Show' x <- return $ Show' True > *DepTest> :t x > x :: forall a. a > *DepTest> x > getTcTyVar a {- tv aXJ -} > getTcTyVar a {- tv aXJ -} > getTcTyVar a {- tv aXJ -} > getT

Re: [Haskell] simulating dependent types; ghc/ghci discrepancy

2004-04-14 Thread Tomasz Zielonka
On Wed, Apr 14, 2004 at 04:58:55PM +0100, Keith Wansbrough wrote: > > data Show' = forall a . Show a => Show' a > > The "forall a. Show a =>" context here has no effect on the > representation; it merely constrains applications of the data > constructor Show'. Since you have to say > > > print

Re: [Haskell] simulating dependent types; ghc/ghci discrepancy

2004-04-14 Thread Keith Wansbrough
> data Show' = forall a . Show a => Show' a The "forall a. Show a =>" context here has no effect on the representation; it merely constrains applications of the data constructor Show'. Since you have to say > print' :: Show' -> IO () anyway (thus providing the dictionary) there is no point in

[Haskell] simulating dependent types; ghc/ghci discrepancy

2004-04-14 Thread John D. Barnett
Hello all- I'm still playing with simulating dependent types using rank-2 polymorphism, and I've run into a small stumbling block on unwrapping existential datatypes: they can't be let-bound (monomorphic restriction?), but can be unwrapped in a case or lambda. Actually, I find that assignment

[Haskell] ANNOUNCE: HSQL 1.4 released

2004-04-14 Thread Krasimir Angelov
I am pleased to announce the HSQL library version 1.4. The HSQL is a simple library, which provides interface to multiple databases. MySQL, PostgreSQL, ODBC and SQLite are currently supported. What is new? 1. The ODBC interface provides the "driverConnect" function which is an al

[Haskell] ANNOUNCE: Happy version 1.14

2004-04-14 Thread Simon Marlow
A new version of Happy, the parser generator for Haskell, has been released. Version 1.14 is a small increment relative to 1.13, whose purpose is mainly to introduce one new feature which will be reuqired to compile future versions of GHC. >From the release notes: * New meta-veriable $>

[Haskell] Call for Contributions - HC&A Report (May 2004 edition)

2004-04-14 Thread Arthur van Leeuwen
Dear Haskellers, two changes of season and one of editor later, we strongly suspect the Haskell community has also moved along admirably. Thus comes the need to refresh our list of all things Haskell, and give *you* the opportunity to tell all the world about your passion. We invite your contribu

[Haskell] Announce: Haskell ACID Relational DBMS v0.1

2004-04-14 Thread S. Alexander Jacobson
In thinking about a data storage model for a web app I wanted to develop, and in finding Haskell so concise and expressive, I wondered if one could write a relational DBMS in Haskell in under 1000 lines of code. The answer appears to be yes! Features: * non-destructive-update Haskell DBMS (can us