I think partial type signatures
http://hackage.haskell.org/trac/haskell-prime/wiki/PartialTypeAnnotations
would allow that kind of tunneling. Is there any ongoing work on that?
/ Emil
Henning Thielemann skrev:
On Mon, 7 Jan 2008, Emil Axelsson wrote:
One approach to programming in
On Mon, 7 Jan 2008, Emil Axelsson wrote:
One approach to programming in Haskell, which I use all the time, is to write
the type signature before the function body. This means that if I'm trying to
do
something strange, I will often be warned by the type checker even before I've
written the
* Henning Thielemann wrote:
happen. Paradoxical. It would be interesting if it is possible to tunnel
Show class dictionaries through to an 'error' like IO is tunneled to
'trace'.
unsafeShow :: (forall a . Show a = a) - String
___
Haskell-Cafe mailing
The only possible definition of such a function is something like
unsafeShow :: (forall a . Show a = a) - String
unsafeShow a = show (a :: Bool)
right?
And you'd also need to coerce the argument type in order to use it:
putStrLn $ unsafeShow $ unsafeCoerce True
Right?
Then a nicer