Re: [Haskell-cafe] Does anyone know where George Pollard is?

2012-11-08 Thread Ketil Malde
Myles C. Maxfield myles.maxfi...@gmail.com writes: Does anyone know where he is? On GitHub? https://github.com/Porges One of the repos was apparently updated less than a week ago. If not, is there an accepted practice to resolve this situation? Should I upload my own 'idna2' package? You

[Haskell-cafe] Why doesn't GHC optimize recursive functions by converting them into `let`?

2012-11-08 Thread Petr P
Hi, recently I found out that some recursive functions can be greatly optimized just by rewriting them using `let` so that they're not recursive themselves any more (only the inner let is). To give an example: fix :: (a - a) - a fix f = f (fix f) isn't optimized, because it's a recursive

[Haskell-cafe] Computed promoted natural

2012-11-08 Thread Arie Peterson
Hi, I'm trying to use data kinds, and in particular promoted naturals, to simplify an existing program. The background is as follows: I have a big computation, that uses a certain natural number 'd' throughout, which is computed from the input. Previously, this number was present as a field

Re: [Haskell-cafe] Computed promoted natural

2012-11-08 Thread Ertugrul Söylemez
Arie Peterson ar...@xs4all.nl wrote: I'm trying to use data kinds, and in particular promoted naturals, to simplify an existing program. The background is as follows: I have a big computation, that uses a certain natural number 'd' throughout, which is computed from the input. Previously,

Re: [Haskell-cafe] Computed promoted natural

2012-11-08 Thread Iavor Diatchki
Hello Arie, One way to achieve the additional static checking is to use values of type `Sing (n :: Nat)` in the places where you've used `Integer` (and parameterize data structures by the `n`). If the code is fully polymorphic in the `n`, then you can use it with values whose types as not

Re: [Haskell-cafe] Why doesn't GHC optimize recursive functions by converting them into `let`?

2012-11-08 Thread Carter Schonwald
Hey Petr, interesting post! (and links) I imagine that one issue that would make it not a default activity by GHC is that this sort of strategy has the following implications: 1) ghc in general doesn't always want to inline in general, inlining increases the size of code! and depending on how