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
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?
> > >
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
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
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
>
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
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
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
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
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
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) ->
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
12 matches
Mail list logo