[Haskell] Re: Type of y f = f . f

2005-02-28 Thread Jim Apple
Jon Fairbairn wrote: If you allow quantification over higher kinds, you can do something like this: d f = f . f d:: âa::*, b::*â*.(b a â a) â b (b a)â a What's the problem with d :: (forall c . b c -> c) -> b (b a) -> a d f = f . f to which ghci gives the type d :: forall a b. (forall c. b c

Re: [Haskell] Type of y f = f . f

2005-02-28 Thread David Menendez
Jon Fairbairn writes: > On 2005-02-28 at 18:03GMT Ben Rudiak-Gould wrote: > > Pedro Vasconcelos wrote: > > >Jim Apple <[EMAIL PROTECTED]> wrote: > > >>Is there a type we can give to > > >> > > >>y f = f . f > > >> > > >>y id > > >>y head > > >>y fst > > >> > > >>are all typeable? > > >

Re: [Haskell] Proposal: Allow "\=" for field update in record update syntax

2005-02-28 Thread Benjamin Franksen
On Thursday 24 February 2005 23:27, Keean Schupke wrote: > Benjamin Franksen wrote: > >>Well at the moment this would give an error, but remember the > >>list is heterogeneous, so you can just not give the list a type, and > >>simply append the specific function... admitedly this is not as > >>type

Re: [Haskell] Building a dynamic loadable Parsec parser

2005-02-28 Thread Donald Bruce Stewart
adam.turoff: > Hi, > > I've got a little parser written using Parsec that I want to link into > some C code. I start by compiling the Haskell sources like so: > > ghc -ffi -fglasgow-exts -main-is My_Init -c parse.hs > > When linking parse.o and parse_stub.o against my (additional) glue co

Re: [Haskell] Type of y f = f . f

2005-02-28 Thread Jon Fairbairn
On 2005-02-28 at 18:03GMT Ben Rudiak-Gould wrote: > Pedro Vasconcelos wrote: > >Jim Apple <[EMAIL PROTECTED]> wrote: > >>Is there a type we can give to > >> > >>y f = f . f > >> > >>y id > >>y head > >>y fst > >> > >>are all typeable? > > > >Using ghci: > > > >Prelude> let y f = f.f >

[Haskell] Building a dynamic loadable Parsec parser

2005-02-28 Thread Adam Turoff
Hi, I've got a little parser written using Parsec that I want to link into some C code. I start by compiling the Haskell sources like so: ghc -ffi -fglasgow-exts -main-is My_Init -c parse.hs When linking parse.o and parse_stub.o against my (additional) glue code, I get the following err

Re: [Haskell] Type of y f = f . f

2005-02-28 Thread Ben Rudiak-Gould
Pedro Vasconcelos wrote: >Jim Apple <[EMAIL PROTECTED]> wrote: >>Is there a type we can give to >> >>y f = f . f >> >>y id >>y head >>y fst >> >>are all typeable? > >Using ghci: > >Prelude> let y f = f.f >Prelude> :t y >y :: forall c. (c -> c) -> c -> c > >So it admits principal type (a->a) -> a->a

[Haskell] postgresql foreign function call segfaults

2005-02-28 Thread Edwin Eyan Moragas
Hi Group, i'm trying to complete an haskell pgsql interface. all compiles well when using ghc's generated executable but it segfaults when i do a pqexec. -- PGresult *PQexec(PGconn *conn, const char *query); foreign import ccall "libpq-fe.h PQexec" pqexec::X_PGconn->CString->IO X_PGresult he

[Haskell] Call for Tutorials - ICTAC05

2005-02-28 Thread Bernhard K. Aichernig
Call for Tutorials - ICTAC05 INTERNATIONAL COLLOQUIUM ON THEORETICAL ASPECTS OF COMPUTING Hanoi, Vietnam - 17--21 October, 2005 http://www.iist.unu.edu/ictac05 = BACKGROUND AND OBJECTIVES ICTAC is an International Colloquium on Theoretical Aspects of Computing founded by the In

Re: [Haskell] Type of y f = f . f

2005-02-28 Thread Till Mossakowski
The name y suggests that you want to define the fixpoint combinator. This works as follows: Prelude> let y f = f (y f) Prelude> :type y y :: forall t. (t -> t) -> t Prelude> y (\fac n -> if n == 0 then 1 else n*fac(n-1)) 10 3628800 Prelude> Till Pedro Vasconcelos wrote: On Mon, 28 Feb 2005 03:50:14

Re: [Haskell] Type of y f = f . f

2005-02-28 Thread Pedro Vasconcelos
On Mon, 28 Feb 2005 03:50:14 -0500 Jim Apple <[EMAIL PROTECTED]> wrote: > Is there a type we can give to > > y f = f . f > > y id > y head > y fst > > are all typeable? > Using ghci: Prelude> let y f = f.f Prelude> :t y y :: forall c. (c -> c) -> c -> c So it admits principal type (a->a) ->

[Haskell] Type of y f = f . f

2005-02-28 Thread Jim Apple
Is there a type we can give to y f = f . f y id y head y fst are all typeable? Jim Apple ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell