Re: [Haskell-cafe] Are type synonym families really equivalent to fundeps?

2007-09-03 Thread Manuel M T Chakravarty
Thanks for this interesting example. Just le me say up front that I regard any FD program that you cannot translate to type families as a bug in the TF implementation. To qualify this a little, this is definitely so for programs that do not require undecidable instances. With undecidable

Re: [Haskell-cafe] Re: Are type synonym families really equivalent to fundeps?

2007-09-03 Thread Manuel M T Chakravarty
Chris Smith wrote, ChrisK wrote: -- You need to help GHC more here: type instance A_T () = explicit type you actually use with () type instance A_T (Var x) = explicit type you actually use with (Var x) type instance A_T [t] = t type instance A_T (RHS (Var x) a) = explicit type you actually use

Re: [Haskell-cafe] Monad.Reader 8: Haskell, the new C++

2007-09-13 Thread Manuel M T Chakravarty
Pepe Iborra wrote, For a taste, see Instant Insanity transliterated in this functional language: http://hpaste.org/2689 I thought I'd better paste here the code for Instant Insanity with Type Families. Otherwise it will vanish in a short time. I took the opportunity to clean it up a bit.

Re: [Haskell-cafe] Monad.Reader 8: Haskell, the new C++

2007-09-13 Thread Manuel M T Chakravarty
Derek Elkins wrote, On Thu, 2007-09-13 at 11:12 -0700, Don Stewart wrote: Better here means better -- a functional language on the type system, to type a functional language on the value level. -- Don For a taste, see Instant Insanity transliterated in this functional language:

[Haskell-cafe] OzHaskell?!?

2007-09-16 Thread Manuel M T Chakravarty
There is AngloHaskell and now AmeroHaskell. Doesn't that call for OzHaskell? http://haskell.org/haskellwiki/OzHaskell Manuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Call for Abstracts for 3rd SAPLING Meeting, November 12, 2007

2007-09-20 Thread Manuel M T Chakravarty
Call for Abstracts for 3rd SAPLING Meeting, November 12, 2007 Sydney Area Programming Language INterest Group http://www.comp.mq.edu.au/plrg/sapling.html 10am-4:30pm, November 12, 2007 Engineering Theatre, Building 32 (Engineering) Australian National University Invited Speaker

Re: [Haskell-cafe] New slogan for haskell.org

2007-10-08 Thread Manuel M T Chakravarty
Don Stewart wrote, catamorphism: On 10/4/07, Don Stewart [EMAIL PROTECTED] wrote: It was raised at CUFP today that while Python has: Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for

Re: [Haskell-cafe] Type-level arithmetic

2007-10-08 Thread Manuel M T Chakravarty
Andrew Coppin wrote, I've seen quite a few people do crazy things to abuse the Haskell type system in order to perform arithmetic in types. Stuff the type system was never ever intended to do. Well I was just wondering... did anybody ever sit down and come up with a type system that *is*

Re: [Haskell-cafe] Re: Type-level arithmetic

2007-10-14 Thread Manuel M T Chakravarty
Dan Piponi wrote, On 10/12/07, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: He wants to write entire programs in the type system, something like the crazies who write programs in C++ templates such that template expansion does all the work at compile time Crazies? :-)

Re: [Haskell-cafe] Re: Type-level arithmetic

2007-10-15 Thread Manuel M T Chakravarty
Lennart Augustsson wrote, And Haskell embedded a logical programming language on accident. Well, we are just trying to fix that :) On 10/15/07, *Manuel M T Chakravarty* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Dan Piponi wrote, On 10/12/07, Brandon S. Allbery KF8NH

Re: [Haskell-cafe] OzHaskell?!?

2007-10-16 Thread Manuel M T Chakravarty
I wrote a while ago, There is AngloHaskell and now AmeroHaskell. Doesn't that call for OzHaskell? http://haskell.org/haskellwiki/OzHaskell In the meantime a number of interested people put their name down on the wiki page. So, let's talk more concretely about a first meeting. I have

Re: [Haskell-cafe] Re: Type-level arithmetic

2007-10-19 Thread Manuel M T Chakravarty
Ross Paterson wrote, On Tue, Oct 16, 2007 at 10:56:27AM +1000, Manuel M T Chakravarty wrote: Lennart Augustsson wrote, And Haskell embedded a logical programming language on accident. Well, we are just trying to fix that :) Since types are inferred using unification, and classes are still

Re: [Haskell-cafe] Should I step into a minefield? / Writing a trading studio in Haskell

2007-11-07 Thread Manuel M T Chakravarty
Joel Reymont: I need to pick among the usual list of suspects for a commercial product that I'm writing. The suspects are OCaml, Haskell and Lisp and the product is a trading studio. My idea is to write something like TradeStation [1] or NinjaTrader, only for the Mac. It would be quite

Re: [Haskell-cafe] why PArr slower than list ?

2007-11-14 Thread Manuel M T Chakravarty
Albert Lee: I read the GHC/Data Parallel Haskell/GHC.PArr page http://haskell.org/haskellwiki/Data_Parallel_Haskell/GHC.PArr and make a simple test to compare the speed of PArr against List: On the wiki page GHC.PArr is described under the heading Convenience without the speed. You'd

Re: [Haskell-cafe] Proposal: Australian Hackathon

2010-03-17 Thread Manuel M T Chakravarty
1) Who's interested Interest, yes, but time is a very scarce resource these days... 2) What dates are good Midyear break is 29 Jun to 18 Jul at UNSW, but I'm away for a week in that time period. 3) What projects people want to work on To be honest, I'd probably be in and out and, on a

Re: [Haskell-cafe] Multidimensional Matrices in Haskell

2010-07-11 Thread Manuel M T Chakravarty
Hi Mihai, A friend of mine wanted to do some Cellular Automata experiments in Haskell and was asking me what packages/libraries are there for multidimensional matrices. I'm interested in both immutable and mutable ones but I don't want them to be trapped inside a monad of any kind. You may

[Haskell-cafe] ComputerWorld AU mention

2006-06-04 Thread Manuel M T Chakravarty
This ComputerWorld (Australia) article, although about OSes, mentions Haskell favourably: http://www.computerworld.com.au/index.php?id=710118083 Technical detail on how Haskell helps to improve OS security is in a recent paper: http://www.cse.unsw.edu.au/~chak/papers/DEKC+06.html Manuel

Re: [Haskell-cafe] Are associated types synonyms like type classes?

2006-11-17 Thread Manuel M T Chakravarty
Brian Smith: When using AT then we have to decide what part of the abstraction is the class and what part is the associated type. Sometimes this seams arbitrary. If we have: class A a where type B b f :: a - B b instance A Int where type B = Bool

Re: [Haskell-cafe] Re: AT solution: rebinding = for restricted monads

2007-02-26 Thread Manuel M T Chakravarty
Pepe Iborra: David Roundy droundy at darcs.net writes: My latest attemp (which won't compile with the HEAD ghc that I just compiled, probably because I haven't figured out the synatax for guards with indexed types is: class WitnessMonad m where type W m :: * - * - * (=)

Re: [Haskell-cafe] Issues(Bugs?) with GHC Type Families

2008-03-03 Thread Manuel M T Chakravarty
Hugo Pacheco: I have recently tried to replicate some examples from in the articles about type families but found some possible bugs. In [2], the example class C a where type S a (k :: * - *) :: * instance C [a] where type S [a] k = (a,k a) does not compile under the claim that the

Re: [Haskell-cafe] Issues(Bugs?) with GHC Type Families

2008-03-06 Thread Manuel M T Chakravarty
Hugo Pacheco: Just something I have been wondering. I would like to implement somehting like: type family F a :: * - * ... class C a b where ... instance (F a ~ F b) = C a b where ... But apparently type equality coercions can not be used as a single context. If I enable

Re: [Haskell-cafe] Re: Small displeasure with associated type synonyms

2008-03-06 Thread Manuel M T Chakravarty
Stefan Holdermans: The problem is ambiguity. The type checker can't determine which val function to use, i.e. which dictionary to pass to val. I see. Still, maybe a type-error message in terms of good old unresolved top-level overloading would be a bit more useful here... ;-) I agree

Re: [Haskell-cafe] Issues(Bugs?) with GHC Type Families

2008-03-09 Thread Manuel M T Chakravarty
Hugo Pacheco: If the equality does not hold, you should get a type error because your program is not type correct. So, what is it that you would like different? I would simply like the compiler not to use that instance if the equality constraint does not hold, like some another instance

[Haskell-cafe] Re: [GSoC] A data parallel physics engine

2008-03-10 Thread Manuel M T Chakravarty
Roman Cheplyaka: I'm looking for interesting project to work on during Google Summer of Code. So I found [1]A data parallel physics engine ticket and got excited about it. I'd like to know interested mentors and community opinion about the complexity of such project. I have not very deep

Re: [Haskell-cafe] Bug with GADT in function Patterns?

2008-03-12 Thread Manuel M T Chakravarty
Hi Hugo, I have found a bug on the compiler (at least ghc 6.8.2). For some module (yes, the example does nothing at all): module Test where data Type a where Func :: Type a - Type b - Type (a - b) PF :: Type a - Type (PF a) data PF a where ID :: PF (a - a) test :: Type a - a -

Re: [Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-12 Thread Manuel M T Chakravarty
Don Stewart: I'd chime in here -- actually getting arrays and parallel arrays with list-like interfaces, and then onto matrices, will impact a lot of people's work, in a good way. I am not quite sure what you mean with a list-like interface. NDP/DPH- style arrays are exactly like Haskell

Re: [Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-12 Thread Manuel M T Chakravarty
Jed Brown: On 12 Mar 2008, [EMAIL PROTECTED] wrote: I don't think there are a great deal of Haskell users who _really_ need a physics engine right now. However, there seem to be a massive number who are working with matrices. I am informed that a lot of physics is just matrix stuff underneath

Re: [Haskell-cafe] [GSoC] A data parallel physics engine

2008-03-12 Thread Manuel M T Chakravarty
Roman Leshchinskiy: Bas van Dijk wrote: A bit offtopic but slightly related: I just added a GSoC project proposal about adding a nVidia CUDA backend to Data Parallel Haskell: http://hackage.haskell.org/trac/summer-of-code/ticket/1537 It would be great if this physics engine or matrix library

Re: [Haskell-cafe] Bug with GADT in function Patterns?

2008-03-12 Thread Manuel M T Chakravarty
Hugo Pacheco: Hi have tried with all versions until ghci-6.9.20080303 (from the nightly builds), is that the one? Yep, that one is fine. I'm sorry but where in the darcs repo can I find it? I cannot find a ghc-6.9 branch. 6.9 is not a branch, it is the main repository; ie,

Re: [Haskell-cafe] type families, fun deps, lattices imposed on/by types

2008-03-16 Thread Manuel M T Chakravarty
Isto Aho: Please, consider the example 03 of Understanding functional dependencies via Constraint Handling rules by Sulzmann, Duck, Peyton-Jones and Stuckey. There we are defining a multiplication over different numeric types: class Mul a b c | a b - c where (*) :: a - b - c instance Mul

Re: [Haskell-cafe] problem with type equality constraints

2008-03-16 Thread Manuel M T Chakravarty
Ganesh Sittampalam: When I try to compile this code with ghc-6.9.20080310: module Test2 where type family Id a type instance Id Int = Int type instance Id (a, b) = (Id a, Id b) class Id a ~ ida = Foo a ida instance Foo Int Int instance (Foo a ida, Foo b idb) = Foo (a, b) (ida, idb) I get

Re: [Haskell-cafe] problem with type equality constraints

2008-03-17 Thread Manuel M T Chakravarty
Ganesh Sittampalam: On Mon, 17 Mar 2008, Manuel M T Chakravarty wrote: Your are completely right. Unfortunately, superclass equalities (ie, the Id a ~ ida in the class declaration of Foo) aren't fully implemented yet. OK, thanks. Is there any rough idea of when they will be? That's

Re: [Haskell-cafe] Re: Type parameters in type families

2008-03-19 Thread Manuel M T Chakravarty
Ryan Ingram: On 3/17/08, Hugo Pacheco [EMAIL PROTECTED] wrote: On the other side, it fails to compile when this signature is explicit: fff :: forall d x. (FunctorF d) = d - F d x - F d x fff a = fmapF a id Interestingly, this works when you also give a type signature to id: fff :: forall d

Re: [Haskell-cafe] Equality constraints in type families

2008-03-23 Thread Manuel M T Chakravarty
Claus Reinke: type family F a :: * - * .. We made the design choice that type functions with a higher-kinded result type must be injective with respect to the additional paramters. I.e. in your case: F x y ~ F u v = F x ~ F u /\ y ~ v i'm still trying to understand this remark: - if we

Re: [Haskell-cafe] Equality constraints in type families

2008-03-23 Thread Manuel M T Chakravarty
Tom Schrijvers: could you please help me to clear up this confusion?-) Let me summarize :-) The current design for type functions with result kinds other than * (e.g. * - *) has not gotten very far yet. We are currently stabilizing the ordinary * type functions, and writing the story up.

Re: [Haskell-cafe] Equality constraints in type families

2008-03-23 Thread Manuel M T Chakravarty
Claus Reinke: type family F a :: * - * .. We made the design choice that type functions with a higher-kinded result type must be injective with respect to the additional paramters. I.e. in your case: F x y ~ F u v = F x ~ F u /\ y ~ v actually, i don't even understand the first part of

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Manuel M T Chakravarty
Claus Reinke: type family F a :: * - * F x y ~ F u v = F x ~ F u /\ y ~ v words, in a type term like (F Int Bool), the two parameters Int and Bool are treated differently. Int is treated like a parameter to a function (which is what you where expecting), whereas Bool is treated like

Re: [Haskell-cafe] Equality constraints in type families

2008-03-24 Thread Manuel M T Chakravarty
Claus Reinke: type family F a :: * - * F x y ~ F u v = F x ~ F u /\ y ~ v why would F x and F u have to be the same functions? shouldn't it be sufficient for them to have the same result, when applied to y and v, respectively? Oh, yes, that is sufficient and exactly what is meant by F x ~ F

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Manuel M T Chakravarty
Manuel M T Chakravarty: again, i gave a concrete example of how ghc behaves as i would expect, not as that decomposition rule would suggest. Maybe you can explain why you think so. I didn't understand why you think the example is not following the decomposition rule. Actually, see

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Manuel M T Chakravarty
Simon Peyton-Jones: | | However, I think I now understand what you are worried about. It is the | | interaction of type families and GHC's generalised type synonyms (i.e., | | type synonyms that may be partially applied). I agree that it does lead | | to an odd interaction, because the

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Manuel M T Chakravarty
Claus Reinke: one might say that the central point of example two were two partially applied type synonym families in the same position (rhs of a type synonym family instance definition). usually, when reduction meets typing, there is a subject reduction theorem, stating that types do not

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Manuel M T Chakravarty
Claus Reinke wrote, given that type families are never meant to be partially applied, perhaps a different notation, avoiding confusion with type constructor applications in favour of something resembling products, could make that clearer? something simple, like braces to group families and

Re: [Haskell-cafe] Equality constraints in type families

2008-03-25 Thread Manuel M T Chakravarty
Dan Doel: On Tuesday 11 March 2008, Tom Schrijvers wrote: I think you've uncovered a bug in the type checker. We made the design choice that type functions with a higher-kinded result type must be injective with respect to the additional paramters. I.e. in your case: F x y

Re: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Manuel M T Chakravarty
Hugo Pacheco: Since I was the one to start this thread, I have managed to implement what I initially wanted as F a :: *-* with F a x::*, and the cost of not having partially applied type synonyms was not much apart from some more equality coercions that I wasn't expecting. [..] Generally,

Re: [Haskell-cafe] Equality constraints in type families

2008-03-26 Thread Manuel M T Chakravarty
Simon Peyton-Jones: | * GHC says that these constraints must be obeyed only | *after* the programmer-written type has been normalised | by expanding saturated type synonyms | ... | I regard this as a kind of pre-pass, before serious type checking | takes place, so I don't

Re: [Haskell-cafe] Equality constraints in type families

2008-03-27 Thread Manuel M T Chakravarty
Hugo Pacheco: Sorry, I meant type FList a x = Either One (a,x) type instance F [a] = FList a We should not allow such programs. Manuel On Thu, Mar 27, 2008 at 4:45 PM, Hugo Pacheco [EMAIL PROTECTED] wrote: The current implementation is wrong, as it permits type S a b = a type

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Manuel M T Chakravarty
[a] = FList a Does FList ignore its second argument? Depends on the type instances of G. Manuel On Fri, Mar 28, 2008 at 12:04 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Hugo Pacheco: Sorry, I meant type FList a x = Either One (a,x) type instance F [a] = FList a We should not allow

Re: [Haskell-cafe] Functional dependencies with Type Classes

2008-03-30 Thread Manuel M T Chakravarty
Henning Günther: suppose there are two (identical) classes: class Res a b | a - b where getRes :: a - b and class Res2 t where type Member t getRes2 :: t - Member t It is easy to automatically make every instance of Res2 an instance of res: instance Res2 a =

Re: [Haskell-cafe] Equality constraints in type families

2008-03-30 Thread Manuel M T Chakravarty
Hugo Pacheco: Anyway, do you think it is feasible to have a flag such as -fallow- unsafe-type-families for users to use at their own risk? (supposing we know how to guarantee these constraints). Sorry, but it doesn't seem like a good idea to enable an unsound type system even by an

Re: [Haskell-cafe] type families and type signatures

2008-04-06 Thread Manuel M T Chakravarty
Ganesh Sittampalam: The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? Yes, unfortunately, this is expected, although it is very unintuitive. This is for the following reason. Let's alpha-rename the signatures

Re: [Haskell-cafe] translating from fundeps into type families

2008-04-07 Thread Manuel M T Chakravarty
Ganesh Sittampalam: Can I have some advice on translating the attached Test1.hs into type families? My attempt at doing so is in Test1a.hs, but firstly it requires FlexibleInstances where Test1.hs didn't, and secondly it fails because it can't infer the instance for Bar (Either Int Int)

Re: [Haskell-cafe] Re: type families and type signatures

2008-04-07 Thread Manuel M T Chakravarty
Hi Mark, I don't know if you have defined/studied corresponding notions of ambiguity/coherence in your framework. Instead, I was referring to what Manuel described as the equivalent problem using FDs: class IdC a b | a - b instance IdC Int Int bar :: IdC a b = b - b bar = id bar' ::

Re: [Haskell-cafe] Re: type families and type signatures

2008-04-07 Thread Manuel M T Chakravarty
apfelmus: Manuel M T Chakravarty wrote: Ganesh Sittampalam: Let's alpha-rename the signatures and use explicit foralls for clarity: foo :: forall a. Id a - Id a foo' :: forall b. Id b - Id b GHC will try to match (Id a) against (Id b). As Id is a type synonym family, it would

Re: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Manuel M T Chakravarty
Ganesh Sittampalam: On Mon, 7 Apr 2008, Manuel M T Chakravarty wrote: Ganesh Sittampalam: The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? Yes, unfortunately, this is expected, although it is very unintuitive

Re: [Haskell-cafe] type families and type signatures

2008-04-08 Thread Manuel M T Chakravarty
Sittampalam, Ganesh: Manuel Chakravarty wrote: Ganesh Sittampalam: On Mon, 7 Apr 2008, Manuel M T Chakravarty wrote: Ganesh Sittampalam: The following program doesn't compile in latest GHC HEAD, although it does if I remove the signature on foo'. Is this expected? Yes, unfortunately

Re: [Haskell-cafe] translating from fundeps into type families

2008-04-08 Thread Manuel M T Chakravarty
Chaddaï Fouché: 2008/4/8, Manuel M T Chakravarty [EMAIL PROTECTED]: You need to write the instance as instance (b ~ TheFoo a, Foo a) = Bar (Either a b) where bar (Left a) = foo' a bar (Right b) = foo' (foo b :: a) If you do that, the program compile, but res still raise a panic

Re: [Haskell-cafe] type families and type signatures

2008-04-09 Thread Manuel M T Chakravarty
Claus Reinke: type family Id a type instance Id Int = Int foo :: Id a - Id a foo = id n foo' :: Id a - Id a foo' = foo type function notation is slightly misleading, as it presents qualified polymorphic types in a form usually reserved for unqualified polymorphic types. rewriting foo's

Re: [Haskell-cafe] type families and type signatures

2008-04-09 Thread Manuel M T Chakravarty
Lennart Augustsson: On Wed, Apr 9, 2008 at 8:53 AM, Martin Sulzmann [EMAIL PROTECTED] wrote: Lennart, you said (It's also pretty easy to fix the problem.) What do you mean? Easy to fix the type checker, or easy to fix the program by inserting annotations to guide the type checker?

Re: [Haskell-cafe] Re: type families and type signatures

2008-04-09 Thread Manuel M T Chakravarty
apfelmus: Manuel M T Chakravarty wrote: apfelmus: Manuel M T Chakravarty wrote: Let's alpha-rename the signatures and use explicit foralls for clarity: foo :: forall a. Id a - Id a foo' :: forall b. Id b - Id b GHC will try to match (Id a) against (Id b). As Id is a type synonym family

Re: [Haskell-cafe] type families and type signatures

2008-04-09 Thread Manuel M T Chakravarty
Lennart Augustsson: Let's look at this example from a higher level. Haskell is a language which allows you to write type signatures for functions, and even encourages you to do it. Sometimes you even have to do it. Any language feature that stops me from writing a type signature is in my

Re: [Haskell-cafe] type families and type signatures

2008-04-11 Thread Manuel M T Chakravarty
Lennart Augustsson: On Thu, Apr 10, 2008 at 4:20 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: the five signatures forall a. S a forall b. S b forall a b. S (a, b) Int S Int By alpha-convertible I mean the usual thing from lambda calculus, they are identical modulo the names

Re: [Haskell-cafe] type families and type signatures

2008-04-11 Thread Manuel M T Chakravarty
to disbale this for certain definitions, because you cannot give them a signature. I find that broken. Definitely. Can you give an example? Manuel On Thu, Apr 10, 2008 at 5:52 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Lennart Augustsson: Let's look at this example from a higher level

Re: [Haskell-cafe] type families and type signatures

2008-04-11 Thread Manuel M T Chakravarty
Lennart Augustsson: On Thu, Apr 10, 2008 at 4:20 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: Lennart Augustsson: On Wed, Apr 9, 2008 at 8:53 AM, Martin Sulzmann [EMAIL PROTECTED] wrote: Lennart, you said (It's also pretty easy to fix the problem.) What do you mean? Easy to fix

Re: [Haskell-cafe] Type families and GADTs in 6.9

2008-04-14 Thread Manuel M T Chakravarty
Dan, I've been playing around with type families off and on in 6.8, but, what with the implementation therein being reportedly incomplete, it's hard to know what I'm getting right and wrong, or what should work but doesn't and so on. So, I finally decided to take the plunge and install 6.9

Re: [Haskell-cafe] type-level integers using type families

2008-05-29 Thread Manuel M T Chakravarty
Peter Gavin: Has anyone else tried implementing type-level integers using type families? I tried using a couple of other type level arithmetic libraries (including type-level on Hackage) and they felt a bit clumsy to use. I started looking at type families and realized I could pretty

Re: [Haskell-cafe] Type families versus functional dependencies question

2008-07-03 Thread Manuel M T Chakravarty
Alexey Rodriguez: We are having trouble with the following program that uses type families: class Blah f a where blah :: a - T f f a class A f where type T f :: (* - *) - * - * the following function does not type: wrapper :: forall a f . Blah f a = a - T f f a wrapper x = blah x

Re: [Haskell-cafe] Type families versus functional dependencies question

2008-07-07 Thread Manuel M T Chakravarty
Alexey Rodriguez: On Fri, Jul 4, 2008 at 5:03 AM, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: The problem is that blah's type is ambiguous, as f does only occur as an argument to the type family. If you'd define class Blah f a where blah :: a - f - T f f a (and change the rest

Re: [Haskell-cafe] Type-level naturals multiplication

2009-10-11 Thread Manuel M T Chakravarty
Brad Larsen: Suppose we implement type-level naturals as so: data Zero data Succ a Then, we can reflect the type-level naturals into a GADT as so (not sure if ``reflect'' is the right terminology here): data Nat :: * - * where Zero :: Nat Zero Succ :: Nat a - Nat (Succ a) Using type

Re: [Haskell-cafe] Type-level naturals multiplication

2009-10-12 Thread Manuel M T Chakravarty
Reid Barton: On Sat, Oct 10, 2009 at 02:59:37PM -0400, Brad Larsen wrote: Suppose we implement type-level naturals as so: data Zero data Succ a Then, we can reflect the type-level naturals into a GADT as so (not sure if ``reflect'' is the right terminology here): data Nat :: * - * where

Re: [Haskell-cafe] Graph Library Using Associated Types

2009-10-12 Thread Manuel M T Chakravarty
Lajos Nagy: I understand that one of the original motivations for introducing associated types to Haskell was the survey of support for generic programming done by Garcia et al. where they compared the implementation of the Boost Graph Library in various languages (C++, Java, Haskell, ML,

Re: [Haskell-cafe] Bulding a library for C users on OS X

2009-11-01 Thread Manuel M T Chakravarty
Chris Eidhof: I'm trying to call a Haskell function from C, on OS X. There's an excellent post [1] by Tomáš Janoušek that explains how to do this on Linux. However, on OS X, it's different. First of all, it looks like the -no-hs-main flag is ignored, because I get the following error:

Re: [Haskell-cafe] university courses on type families/GADTs?

2009-12-01 Thread Manuel M T Chakravarty
Tom Schrijvers wrote, I was wondering whether there are any universities that teach about Haskell type families or GADTs? I do in my course Language-based Software Safety (both TFs and GADTs). It's an advanced, research-oriented course for 4th year undergraduate and for postgraduate

Re: [Haskell-cafe] OpenCL target for DPH?

2009-12-07 Thread Manuel M T Chakravarty
Marcus Daniels wrote, I'm wondering if anyone has looked at OpenCL as target for Data Parallel Haskell? Specifically, having Haskell generate CL kernels, i.e. SIMD vector type aware C language backend, as opposed to just a Haskell language binding. The short answer is that there is currently

Re: [Haskell-cafe] How many Haskell Engineer I/II/IIIs are there?

2010-02-10 Thread Manuel M T Chakravarty
John Van Enk: consider presenting at CUFP this year Any word on when this will be? It'll be before or after (I suspect the later) ICFP http://www.icfpconference.org/icfp2010/, which is September 27-29 in Baltimore, Maryland. Manuel ___

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Manuel M T Chakravarty
Matijs Erisson: Malcolm Wallace [EMAIL PROTECTED] writes: ... And avoid getting screwed up by malicious folk? ... but I believe there are a number of people who regularly review all the Recent Changes and undertake to 'undo' any malicious/inaccurate modifications.

Re: [Haskell-cafe] How to use a wiki to annotate GHC Docs? was Re: [Haskell] Re: Making Haskell more open

2005-11-16 Thread Manuel M T Chakravarty
Neil Mitchell: I don't think restricting editing to registered users is a significant turn off if registration is simple. It really really is a turn off. Sometimes when I spot a mistake, and I'm at a computer where I haven't logged in to hawiki, I don't bother fixing it. No one wants to

Re: [Haskell-cafe] Hackage or Where to Host Haskell projects, and simple darcsforge description was Re: Making Haskell more open

2005-11-16 Thread Manuel M T Chakravarty
Shae Matijs Erisson: I have a simple plan for a darcsforge as well: If Cabal includes a darcs-repository field, developers will be able to upload their project.cabal file to Hackage or to a darcsforge server. That server will run darcs pull on the repositories once a night or so. The

Re: [Haskell-cafe] c2hs seems to ignore the types I give it when generating foreign import declarations

2005-12-11 Thread Manuel M T Chakravarty
Cale Gibbard: Hello, I've just started writing bindings to the Enlightenment Foundation Libraries, using c2hs. I've run into the following problem with the types in the foreign import declarations generated. In Imlib2.h, there is a function prototype: int imlib_get_visual_depth(Display *

Re: [Haskell-cafe] c2hs seems to ignore the types I give it when generating foreign import declarations

2005-12-11 Thread Manuel M T Chakravarty
Cale Gibbard: On 11/12/05, Manuel M T Chakravarty [EMAIL PROTECTED] wrote: You need to tell c2hs to what Haskell type a C pointer type maps before it can generate the right signature for the import declaration. This is done using a pointer hook: http://www.cse.unsw.edu.au/~chak

Re: [Haskell-cafe] c2hs seems to ignore the types I give it when generating foreign import declarations

2005-12-18 Thread Manuel M T Chakravarty
Benjamin Franksen: On Monday 12 December 2005 02:17, Manuel M T Chakravarty wrote: The darcs version of c2hs darcs get --partial http://www.cse.unsw.edu.au/~chak/repos/c2hs/ now permits the use of a `nocode' keyword ... Hello not directly related, but are there any plans to add

Re: Re[2]: [Haskell-cafe] STUArray

2006-03-18 Thread Manuel M T Chakravarty
Bulat Ziganshin: Hello Chris, Sunday, March 12, 2006, 2:05:09 PM, you wrote: CK Is GHC.PArr documented? it's perfectly documented in module sources itself :) you can also look at the ndpFlatten directory in ghc compiler's sources. i've successfully used them in my program, of course

[Haskell-cafe] Re: Associated types and data constructors (was: the MPTC Dilemma (please solve))

2006-03-21 Thread Manuel M T Chakravarty
David Menendez: This is something I've been wondering about for a while. Can you do that sort of thing with associated types? As another example, consider this type class for composible continuation monads: class Monad m = MonadCC p sk m | m - p sk where newPrompt :: m (p

[Haskell-cafe] Re: [Haskell] Proposal: Form a haskell.org committee

2010-09-05 Thread Manuel M T Chakravarty
Ian Lynagh: To fix this problem, we propose that we create a haskell.org committee, which is responsible for answering these sorts of questions, although for some questions they may choose to poll the community at large if they think appropriate. [..] Unfortunately, this gives us a

Re: [Haskell-cafe] DPH and GHC 7.0.1

2010-11-28 Thread Manuel M T Chakravarty
Andrew Coppin: On 19/11/2010 11:39 PM, David Peixotto wrote: There were some problems getting DPH to work well with the changes in GHC 7. There is more info in this mail: http://www.haskell.org/pipermail/cvs-ghc/2010-November/057574.html The short summary is that there will be a patch

Re: [Haskell-cafe] Generating Haskell with associated types (and kind annotations)

2009-05-09 Thread Manuel M T Chakravarty
Hi Dan, I was wondering whether anyone had any suggestions on a good way to generate repetitive code with associated types and kind annotations. I'd like to use TH but as far as I understand, it doesn't support this yet (I think associated types are in HEAD but not kinds), I implemented type

Re: [Haskell-cafe] haskell cuda?

2009-05-13 Thread Manuel M T Chakravarty
Dan: Doesn't look like there's code out there - will try e-mailing the authors of the various papers/presentations. We haven't made any code available yet, but we are planning to do so before ICFP this year. This e-mail also counts as an open plea to those compiler wizards working on

Re: [Haskell-cafe] Type families in export lists

2009-05-31 Thread Manuel M T Chakravarty
Lee Duhem: On Sat, May 30, 2009 at 7:35 PM, Maurí cio briqueabra...@yahoo.com wrote: Hi, How do I include type families (used as associated types) in a module export list? E.g.: class MyClass a where type T a :: * coolFunction :: Ta - a (...) If I just include MyClass and its

Re: [Haskell-cafe] Building NDP with latest GHC

2008-07-22 Thread Manuel M T Chakravarty
Austin Seipp: After my last issue with GHC's HEAD, I tried checking it out again and getting the patches for the libraries and lo and behold, it worked. So now I'm up to date with the latest libraries and the compiler, but it appears that building NDP itself is proving to be troublesome. The

Re: [Haskell-cafe] xmonad on the openmoko mobile phone

2008-08-10 Thread Manuel M T Chakravarty
Don Stewart: Haskell fans might be impressed by the good work of Joachim Breitner, who got xmonad running on his openmoko phone, http://www.joachim-breitner.de/blog/archives/300-Xmonad-on-my-mobile-phone.html You can see a photo here,

Re: [Haskell-cafe] Haskell Xcode Plugin

2008-08-21 Thread Manuel M T Chakravarty
Dennis Buchmann: during my search for an acceptable development environment under Mac OS X I found this Plugin for Xcode: http://hoovy.org/HaskellXcodePlugin/ Unfortunately, I'm not able to get it to run in Xcode v3.0 and the developer seems to be not contactable at the moment. So, has

Re: [Haskell-cafe] Research language vs. professional language

2008-09-02 Thread Manuel M T Chakravarty
Ryan Ingram: On Sun, Aug 31, 2008 at 7:27 PM, Jonathan Cast [EMAIL PROTECTED] wrote: This concept of `day-to-day work' is a curious one. Haskell is not a mature language, and probably shouldn't ever be one. I see where you are coming from here, but I think that train has already started and

Re: [Haskell-cafe] GHC trouble on Leopard

2008-09-16 Thread Manuel M T Chakravarty
Miguel, I tried to compile some code on Mac Os X (Intel) Leopard. I have GHC 6.8.3 installed - the installer from GHC webpage (GHC-6.8.3-i386.pkg). But when I run make I get this error ghc-6.8.3: could not execute: /Library/Frameworks/GHC.framework/ Versions/608/usr/lib/ghc-6.8.3/ghc-asm

Re: [Haskell-cafe] Distributing Haskell binaries as OSX App Bundles

2008-09-29 Thread Manuel M T Chakravarty
I wrote a command-line program recently for a friend in haskell. However, he's far away and not particularly computer literate. I sent him the raw binaries, but they came up with errors about not being able to find libgmp stuff. So then I thought I should probably be able to somehow

Re: [Haskell-cafe] Type family oddity

2008-10-05 Thread Manuel M T Chakravarty
Claus Reinke wrote: Btw, is there a list of common TF pitfalls somewhere? Some example items so far seem to be: 1 'C a = TF a', where 'a' isn't determinable 2 'TF a' is not fully polymorphic 3 'TF a' is not a decomposable type constructor, it stands only for itself, or for its result (in that

Re: [Haskell-cafe] Type family oddity

2008-10-05 Thread Manuel M T Chakravarty
Florian Weimer: I can't figure out why the following code doesn't compile with the October 2n GHC 6.10 beta (-XTypeFamilies -XFlexibleContexts) when the type declaration is not commented out. It's a bug that the code is accepted *without* the signature, as the signature is ambiguous:

Re: [Haskell-cafe] Simplifying a IsFunction type class using type equality constraints

2008-10-08 Thread Manuel M T Chakravarty
Corey O'Connor: I recently had a need to use the IsFunction typeclass described by Oleg here: http://okmij.org/ftp/Haskell/isFunction.lhs and am wondering if the use of the TypeCast class can be correctly replaced by a type equality constraint. The IsFunction and TypeCast classes were

Re: [Haskell-cafe] ANNOUNCE: Salsa: A .NET Bridge for Haskell

2008-10-15 Thread Manuel M T Chakravarty
Great! Thanks for putting the code out! Manuel ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Go Haskell!

2008-11-27 Thread Manuel M T Chakravarty
Claus Reinke: What do those folks working on parallel Haskell arrays think about the sequential Haskell array baseline performance? You won't like the answer. We are not happy with the existing array infrastructure and hence have our own. Roman recently extracted some of it as a

Re: [Haskell-cafe] Could FDs help usurp an ATs syntactic restriction?

2008-12-07 Thread Manuel M T Chakravarty
Nicolas Frisby: From the error below, I'm inferring that the RHS of the associated type definition can only contain type variables from the instance head, not the instance context. I didn't explicitly see this restriction when reading the GHC/Type_families entry. Could perhaps the a b - bn

RE: combinator parsers and XSLT

2000-09-25 Thread Manuel M. T. Chakravarty
Doug Ransom [EMAIL PROTECTED] wrote, There is no need for "." or [^abc] as Haskell list operators can be used to "simulate" them. The following is from the C lexer and matches all visible characters and all characters except newline, respectively: visible = alt [' '..'\127']

  1   2   >