Greg Buchholz wrote:
Wow. Color me impressed. A little under a week ago, I stumbled
onto Joy, and thought to myself that it could be translated almost
directly into Haskell (which would imply it was possible to statically
type). Well, it wasn't quite as direct as I had initially thought, but
Keean Schupke wrote:
The things to notice are using types as instance labels, that constraints
form horn clause compile time meta-programs (in a non-backtracking prolog
style) and that multi-parameter classes with functional depandencies simulate
some dependant types.
I think I
Greg Buchholz wrote:
Keean Schupke wrote:
I dont see why this is illegal... what do we want? take the top two
items from the stack?
With the code below (direct translation from tuples to HLists) I
still get an occurs check error when trying to define fact5...
Okay the reason is that
Keean Schupke wrote:
Haskell is not dependantly typed, so cannot deal with types that depend on
values.
Can anyone recommend a nice dependently typed language to play with?
Cayenne, Epigram, other?
Greg Buchholz
___
Haskell-Cafe mailing list
Greg Buchholz wrote (on Wed, 09 Mar 2005 at 20:08):
Can anyone recommend a nice dependently typed language to play with?
Cayenne, Epigram, other?
http://www.cs.chalmers.se/~catarina/agda/
See also the sexy IDE alfa: http://www.cs.chalmers.se/~hallgren/Alfa/
Peter Hancock
Greg Buchholz wrote:
Keean Schupke wrote:
Haskell is not dependantly typed, so cannot deal with types that depend on
values.
Can anyone recommend a nice dependently typed language to play with?
Cayenne, Epigram, other?
I have refactored your code into a type level Haskell program.
This
Keean Schupke wrote:
I have refactored your code into a type level Haskell program.
This has the nice advantage that it is extensible.
Wow. Color me impressed. A little under a week ago, I stumbled
onto Joy, and thought to myself that it could be translated almost
directly into Haskell
Keean Schupke wrote:
Daniel Fischer wrote:
And, BTW, that's why Keean et al's HList library doesn't help here either,
the type of an HList determines the number of elements and the type of
each, so there we face the same problems as with nested tuples. What we
need is type Stack =
Am Dienstag, 8. März 2005 17:31 schrieben Sie:
Daniel Fischer wrote:
The problem is that for the recursion combinators we need polymorphic
recursion functions.
For fact3 we need
rec2 :: forall l. (HCons a (HCons a l) - HCons a l),
I dont see why this is illegal... what do we want? take the
Keean Schupke wrote:
I dont see why this is illegal... what do we want? take the top two
items from the stack?
With the code below (direct translation from tuples to HLists) I
still get an occurs check error when trying to define fact5...
Compiling Main ( joy3.hs, interpreted
Daniel Fischer wrote:
Am Freitag, 4. M?rz 2005 19:35 schrieb Greg Buchholz:
So, can anyone direct me towards more information on exactly
what an Occurs check is, or does anyone see an easy fix to my
problems?
If I remember correctly, an occurs check is checking whether a type
variable
Am Montag, 7. März 2005 17:58 schrieb Greg Buchholz:
Daniel Fischer wrote:
Am Freitag, 4. März 2005 19:35 schrieb Greg Buchholz:
So, can anyone direct me towards more information on exactly
what an Occurs check is, or does anyone see an easy fix to my
problems?
If I remember
Daniel Fischer wrote:
And, BTW, that's why Keean et al's HList library doesn't help here either, the
type of an HList determines the number of elements and the type of each, so
there we face the same problems as with nested tuples. What we need is
type Stack = [ArbitraryType] (from the HList
Daniel Fischer wrote:
I think, it would be possible to define recursion combinators for specific
patterns, like this functions takes 4 elements from the stack, this one 3 and
so on, but then you would need combinators for all these patterns, which is
rather cumbersome.
Hmm. The
On Mon, Mar 07, 2005 at 08:47:11PM +0100, Daniel Fischer wrote:
And, BTW, that's why Keean et al's HList library doesn't help here either,
the
type of an HList determines the number of elements and the type of each, so
there we face the same problems as with nested tuples. What we need is
Daniel Fischer wrote:
I don't know Joy, but probably there the stack is (roughly) a heterogenous
list, which is hard to model in Haskell, think of
data Element = Bool Bool
| Char Char
| Int Int
. . .
| IntToBool
Keean wrote:
Not saying it isn't tricky - but thats what the HList library
(http://www.cwi.nl/~ralf/HList) implements, a heterogenous list.
It works slightly differently using classes, but does abstract the
workings enough to be useful, to construct an HList you can do:
hlist = a .*.
Am Freitag, 4. März 2005 19:35 schrieb Greg Buchholz:
Recently, while investigating the (non-statically typed) stack-based
functional language Joy
(http://www.latrobe.edu.au/philosophy/phimvt/joy.html), I became interested
in seeing if I could implement Joy's combinators in Haskell. I
Recently, while investigating the (non-statically typed) stack-based
functional language Joy (http://www.latrobe.edu.au/philosophy/phimvt/joy.html),
I became interested in seeing if I could implement Joy's combinators in
Haskell. I started with a stack based implementation using nested
19 matches
Mail list logo