unsafePerformIO to give warnings

2001-12-20 Thread Ian Lynagh
Hi all If I want to give warnings when doing something and I don't care too much about the order they appear in, can I use this? foo x = if success x then Just x else warn "Working out x went wrong" Nothing warn :: String -> a -> a warn s x = unsafePerformI

installation problems with graphics-2.0.4

2001-12-20 Thread Bernhard Reus
The graphics lib of the new December release does not compile with the shipped makefile. The makefile does not do anything at all??? Maybe there is a problem with wildcard extensions? To be honest, I have no clue. I am using a Sparc5/Solaris machine. Any help appreciated. Thanks in advance, B

Working Conference on Generic Programming, 2nd call for papers

2001-12-20 Thread Johan Jeuring
WCGP '02 IFIP WG2.1 Working Conference on GENERIC PROGRAMMING http://www.generic-programming.nl/wcgp/cfp.html Organised in conjunction with MPC'02 July 8 - July 13,

Re: global counters

2001-12-20 Thread Jan de Wit
> basically, i want a function getVar :: () -> String which returns a new > string every time. i tried this: > > > curVarId = newSTRef (0 :: Integer) > > > > {-# NO-INLINE newVar -} > > > > newVar = \_ -> ('\0' : show x) > > where y = unsafePerformIO (stToIO curVarId) > > x = unsaf

x^y. Reply

2001-12-20 Thread S.D.Mechveliani
Toralf Wittner <[EMAIL PROTECTED]> writes > [..] > data PowerNum = INT Integer | DBL Double deriving (Eq, Show, Read) > [..] > Now it basically works. However wouldn't it have been easier to write > something like this: > > powPos :: Integer -> Integer -> Integer > [..] > powNeg :: Integer ->