guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some guile-unify activities


From: Ludovic Courtès
Subject: Re: Some guile-unify activities
Date: Sun, 08 May 2011 17:38:52 +0200
User-agent: Gnus/5.110017 (No Gnus v0.17) Emacs/24.0.50 (gnu/linux)

Hey,

Nice stuff!

Stefan Israelsson Tampe <address@hidden> writes:

> 3. For the type-checking examples I've been working with the assumptions of
> having fixed declarations for
> lambdas and deduce types for variables and their passage through the system.
> The thought is that in the end
> one need to allow lambdas to be explicitly typed in order to allow advanced
> type-checking and at the same time
> avoid infinite recursions. I think that it's not uncommon in Haskell
> programming to add type information in order
> to guide the type checker and being at such an infant stage having something
> useful and working must simple allow
> for type hint's in the code.

FWIW the Hindley-Milner type inference example of Mini-Kanren works
well, at least for simple cases:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (run* (q) (!- (parse '(lambda (x) (+ x 1))) q))
$1 = ((int -> . int))
scheme@(guile-user)> (run* (q) (!- (parse '(lambda (x) (zero? x))) q))
$3 = ((int -> . bool))
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]