| jbauman | ?djinn [a] -> [b] -> [c] -> [d] -> [(a,b,c,d)] |
| lambdabot | -- f cannot be realized. |
| jbauman | ?djinn [a] -> [a] -> [a] -> [a] -> [(a,a,a,a)] |
| lambdabot | -- f cannot be realized. |
| sorear | djinn doesn't do recursion not even recursive types |
| jbauman | oh well seemed like it was worth a shot |
| thetallguy | Hey folks, I need a pointer |
| monochrom | void *ptr; |
| dibblego | thetallguy, use C then |
| thetallguy | sjanssen answered a question of mine last week: http://hpaste.org/1685 dibblego: ;-) but the answer doesn't work. Can someone cite a reference for what he intended? |
| dolio | thetallguy: In haskell 98, you're allowed to have a data declaration like 'data MyClass a => Phantom a = Phantom String' |
| thetallguy | dolio, yes, but it doesn't carry through. The first example in the hpaste does not typecheck |
| dolio | However, that just constrains the type of the constructor. It doesn't actually remember it. |
| thetallguy | Right that's what sjanssen made clear |
| dolio | However, with generalized algebraic datatypes, in the latest GHC, it will remember it. |
| thetallguy | he said using the GADT would fix it. The example he pasted still doesn't typecheck for me latest ghc? 6.6.1? |
| cinimod | coutts_: and I will get round to using it but I want to crack PER first |
| lambdabot | The section `(+ 2)' takes one argument, but its type `Integer' has n... |
| LoganCapaldo | @check (\n -> ap (+) (const 2) n == (+2) n) :: Integer -> Bool |
| lambdabot | OK, passed 500 tests. |
| dmhouse | mauke: in IO. |
| mauke | dmhouse: you could do it on top of IORef |
| dcoutts_ | cinimod: right'o |
| dmhouse | mauke: so a global mutvar, then. |
| mauke | IORefs aren't global |
| dmhouse | Or unless you mean make the handle the IORef... |
| LoganCapaldo | @check (\f n v -> ap f (const n) v == (f n) v) |
| lambdabot | Add a type signature |
| dmhouse | Ah, nice idea. |
| LoganCapaldo | @check (\f n v -> ap f (const n) v == (f n) v) :: (Integer -> Integer) -> Integer -> Bool |