#haskell - Tue 8 May 2007 between 03:10 and 18:48



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.
soreardjinn doesn't do recursion
not even recursive types
jbaumanoh well
seemed like it was worth a shot
thetallguyHey folks, I need a pointer
monochromvoid *ptr;
dibblegothetallguy, use C then
thetallguysjanssen 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?
doliothetallguy: In haskell 98, you're allowed to have a data declaration like 'data MyClass a => Phantom a = Phantom String'
thetallguydolio, yes, but it doesn't carry through.
The first example in the hpaste does not typecheck
dolioHowever, that just constrains the type of the constructor. It doesn't actually remember it.
thetallguyRight
that's what sjanssen made clear
dolioHowever, with generalized algebraic datatypes, in the latest GHC, it will remember it.
thetallguyhe said using the GADT would fix it.
The example he pasted still doesn't typecheck for me
latest ghc?
6.6.1?
cinimodcoutts_: and I will get round to using it but I want to crack PER first
lambdabotThe section `(+ 2)' takes one argument, but its type `Integer' has n...
LoganCapaldo@check (\n -> ap (+) (const 2) n == (+2) n) :: Integer -> Bool
lambdabotOK, passed 500 tests.
dmhousemauke: in IO.
maukedmhouse: you could do it on top of IORef
dcoutts_cinimod: right'o
dmhousemauke: so a global mutvar, then.
maukeIORefs aren't global
dmhouseOr unless you mean make the handle the IORef...
LoganCapaldo@check (\f n v -> ap f (const n) v == (f n) v)
lambdabotAdd a type signature
dmhouseAh, nice idea.
LoganCapaldo@check (\f n v -> ap f (const n) v == (f n) v) :: (Integer -> Integer) -> Integer -> Bool

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 

IrcArchive