User loginNavigation 
Looking for an autolifting language.I have been looking for a language that includes the following form of resolution, but have not yet come to one. Given a function f: a > b, and a list l: [a], I would like for the language to consider "f l" a valid expression. In particular, I would like it to automatically "lift" f to be typed as f:[a] > [b] by rewriting "f l" as "map f l". In general, given a functor F : a > F a, a function f : a > b, and value v : F a, I would like for the expression "f v" to be rewritten as "F(f) v : F(b)". In addition, a multivariable method such as + : double > double > double, would lift based on the types of its arguments. Examples: I understand that all of this can be done by augmenting the code to be written in terms of do notation (almost, these are just plain functors, not monads), but I want a language that does that for me: do x <  a, y <b, return $ x + y (is equivalent to) a + b. If such a language doesn't exist, can I get suggestions on best/easiest ways to accomplish this. I have considered using a preprocessor/modifying the type resolution process to include the additional code generation for an existing language, but I am not sure if there are other options/which is better. I wrote the above in Haskell notation just for communication purposes. OO languages would be appreciated as well. Many thanks, By robmeyers at 20080821 15:15  LtU Forum  previous forum topic  next forum topic  other blogs  5050 reads

Browse archivesActive forum topics 
Recent comments
23 min 6 sec ago
45 min 21 sec ago
1 hour 29 min ago
2 hours 24 min ago
2 hours 26 min ago
2 hours 59 min ago
4 hours 25 min ago
6 hours 58 min ago
9 hours 15 min ago
10 hours 52 min ago