[Haskell-cafe] Type-Level Programming
illissius at gmail.com
Sat Jun 26 08:29:28 EDT 2010
On Sat, Jun 26, 2010 at 3:49 AM, wren ng thornton <wren at freegeek.org> wrote:
> Jason Dagit wrote:
>> On Fri, Jun 25, 2010 at 2:26 PM, Walt Rorie-Baety
>> <black.meph at gmail.com>wrote:
>>> I've noticed over the - okay, over the months - that some folks enjoy the
>>> puzzle-like qualities of programming in the type system (poor Oleg, he's
>>> become #haskell's answer to the "Chuck Norris" meme commonly encountered
>>> Anyway,... are there any languages out there whose term-level programming
>>> resembles Haskell type-level programming, and if so, would a deliberate
>>> effort to appeal to that resemblance be an advantage (leaving out for now
>>> the hair-pulling effort that such a change would entail)?
>> I'm not a prolog programmer, but I've heard that using type classes to do
>> your computations leads to code that resembles prolog.
> Indeed. If you like the look of Haskell's type-level programming, you should
> look at logic programming languages based on Prolog. Datalog gives a well
> understood fragment of Prolog. ECLiPSe extends Prolog with constraint
> programming. Mercury, lambda-Prolog, and Dyna give a more modern take
> on the paradigm.
It's interesting how C++ is imperative at the term level and
functional at the type level, while Haskell is functional at the term
level and similar to logic programming at the type level. Given
imperative, functional, and logic programming, that's nine possible
combinations of paradigms at the term and type level. How many of them
do we have examples for?
functional/functional: Agda etc. (?)
> If you're just a fan of logic variables and want something more
> Haskell-like, there is Curry. In a similar vein there's also AliceML
> which gives a nice futures/concurrency story to ML. AliceML started out on
> the same VM as Mozart/Oz, which has similar futures, though a different
> overall programming style.
> And, as Jason said, if you're just interested in having the same programming
> style at both term and type levels, then you should look into dependently
> typed languages. Agda is the most Haskell-like, Epigram draws heavily from
> the Haskell community, and Coq comes more from the ML tradition. There's a
> menagerie of others too, once you start looking.
>  http://eclipse-clp.org/ is currently down, but can be accessed at
>  http://www.mercury.csse.unimelb.edu.au/
>  http://www.lix.polytechnique.fr/~dale/lProlog/
>  http://www-ps.informatik.uni-kiel.de/currywiki/
>  http://www.ps.uni-saarland.de/alice/
>  http://www.mozart-oz.org/
> Live well,
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Work is punishment for failing to procrastinate effectively.
More information about the Haskell-Cafe