Ãß¿î °Ü¿ï Çï·Î¿ìƼ¿Í ÇÔ²² Â÷ÇÑÀÜ ÇϽÃÁö¿ä..*^^*

2001-12-20 Thread Çï·Î¿ìƼ
Title: Çï·Î¿ìƼ°¡ µå¸®´Â Å©¸®½º¸¶½º ¼±¹°!






   
 
  
 
   

   

  
   
 
  
 
   

   
 
  [Çï·Î¿ìƼ°¡ 
µå¸®´Â Å©¸®½º¸¶½º ¼±¹°]

  
   
½Ä¹°³ª¶ó [Botanical Total Gift 4Á¾Set] -1Ù£
  º¸Å´ÏÄà ¸Á°í¼¤Çª 200g*1 º¸Å´ÏÄà ¿ÀÅ°µå¼¤Çª 
  200g*1 º¸Å´ÏÄà ·ÎÁîºñ´© 100g*1 º¸Å´ÏÄà ÆÄÀξÖÇúñ´© 100g*1
  
   
´ëÇÑÆÞÇÁ(ÁÖ)[±ú²ýÇÑ ³ª¶ó 18·ÑÈ­ÀåÁö ]-2Ù£
  
   
Çѱ¹Á¦´Ù °Ç°­Â÷ SET -3Ù£
  °¨ÀÙÂ÷+µÎÃæÂ÷+ÀÛ¼³Â÷ 
  

  
  

  

  
   
  

  

  

  

  


   
 
  
 
  º» ¸ÞÀÏÀº Á¤º¸Åë½Å¸Á ÀÌ¿ëÃËÁø ¹× Á¤º¸º¸È£ µî¿¡ °üÇÑ ¹ý·ü Á¦ 50Á¶¿¡ ÀÇ°ÅÇÑ [±¤°í] ¸ÞÀÏÀÔ´Ï´Ù.
º» ¸ÞÀÏÀº ÀÎÅÍ³Ý »ó¿¡ °ø°³µÈ ¸ÞÀÏ ÁÖ¼Ò¸¦ ±Ù°Å·Î ¹ß¼ÛÇÏ¿´½À´Ï´Ù.
±ÍÇÏÀÇ À̸ÞÀÏ Á¤º¸ ÀÌ¿Ü¿¡ ÀúÈñ°¡ º¸À¯ÇÏ°í ÀÖ´Â °³ÀÎÁ¤º¸´Â ÀÏü °®°í ÀÖÁö ¾ÊÀ½À» ¾Ë·Áµå¸®¸ç..
¿øÄ¡ ¾ÊÀ¸¼Ì´ø ¸ÞÀÏ ÀÌ¼Ì´Ù¸é ¸Ó¸®¼÷¿© °Åµì »ç°úÀÇ ¸»¾¸ µå¸³´Ï´Ù.
±ÍÇÏÀÇ ÇູÇÑ ³¯°ú ÇϽôÂÀÏ ¸ðµÎ ¹øâÇÏ½Ã±æ ¹Ù¶ó¸ç...
Ȥ½Ã¶óµµ ¸ÞÀÏÀÌ Áߺ¹µÇ¾î ´Ù½Ã ¸ÞÀÏÀ» ¹ÞÀ¸½Å ±ÍÇϲ²¼­´Â ¼ö½Å°ÅºÎ½Ã Áߺ¹À» Ç¥±âÇÏ¿© Áֽøé Áï½Ãó¸®ÇÏ°Ú½À´Ï´Ù. 

  

  


  




___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


RE: The signature contexts in a mutually recursive group should all be identical; why?

2001-12-20 Thread Simon Peyton-Jones

It's what H98 says.  And it's jolly awkward to compile otherwise.
Where does 'f' get the dictionary from to pass to 'g'?  
(Presumably they are mutually recursive.)

Mind you, if you are doing polymorphic recursion then I suppose
these strictures do not apply; but I'll have to fiddle with the type
checker to make that happen (a long-standing wish-list item).
Is it inconvenient, or actually a show stopper?

Simon

| -Original Message-
| From: George Russell [mailto:[EMAIL PROTECTED]] 
| Sent: 19 December 2001 12:22
| To: [EMAIL PROTECTED]
| Subject: The signature contexts in a mutually recursive 
| group should all be identical; why?
| 
| 
| The attached file doesn't compile (ghc -fglasgow-exts), with 
| the message
| 
| RecContext.hs:12:
| Mismatched contexts
| When matching the contexts of the signatures for
|   g :: forall a b. (Silly a b) = a - b - SillyType a 
| - [String]
|   f :: forall a. SillyType a - [String]
| The signature contexts in a mutually recursive group 
| should all be identical
| When generalising the type(s) for g, f
| 
| 
| This seems strange.  f can't have the context Silly a b, as b 
| doesn't occur in its signature and is introduced later as 
| part of an existential constructor . . .
| 
| I know this code looks pretty pointless.  If you want to see 
| the Real World 450 line module which provoked the message, do 
| ask, but only if you like having your brain curdled by 
| mixtures of dependent types, existential types and 
| overlapping multi-parameter type classes . . .
| 

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs



GHC-3.02 (maybe OFF-time)

2001-12-20 Thread Rafael Martínez Torres

Hi all:
I'm hacking with ghc-3.02.src.tar.gz on several platforms, namely i386
and sparc ...

Both platforms run with gcc-2.7.2.3 ( higher versions may be a risk ,
2.95 was bad...)

In sparc I have no problems,  but in i386 I do obtain the next results
(File : fptools/ghc/lib/posix/PosixProcPrim.hc)

../../../ghc/driver/ghc -i../misc -recomp -cpp -fglasgow-exts -fvia-C
-Rghc-timing -O   '-#includecbits/libposix.h'  -c PosixProcPrim.hc -o
PosixProcPrim.o -osuf o
PosixProcPrim.hc:2244: fixed or forbidden register was spilled.
This may be due to a compiler bug or to impossible asm
statements or clauses.

I think cc1 is reducing uncorrectly to asm code.

Reading documents on gcc, I got this... ( File: /usr/docs/gcc/PROBLEMS )
May be has nothing to do...

3. When find_reloads is used to count number of spills needed
it does not take into account the fact that a reload may
turn out to be a dummy.

May be this is rather a question for gcc , but...

 Does any body know where to add any flag to help gcc to reduce OK ?
I tried no -O flag , -O2 ,-O1, but no sucess...

Regards...

Martinez-Torres.

___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



RE: GHC-3.02 (maybe OFF-time)

2001-12-20 Thread Simon Marlow


 I'm hacking with ghc-3.02.src.tar.gz on several platforms, namely i386
 and sparc ...
 
 Both platforms run with gcc-2.7.2.3 ( higher versions may be a risk ,
 2.95 was bad...)
 
 In sparc I have no problems,  but in i386 I do obtain the next results
 (File : fptools/ghc/lib/posix/PosixProcPrim.hc)
 
 ../../../ghc/driver/ghc -i../misc -recomp -cpp -fglasgow-exts -fvia-C
 -Rghc-timing -O   '-#includecbits/libposix.h'  -c 
 PosixProcPrim.hc -o
 PosixProcPrim.o -osuf o
 PosixProcPrim.hc:2244: fixed or forbidden register was spilled.
 This may be due to a compiler bug or to impossible asm
 statements or clauses.

You need to give GHC the -monly-3-regs (or possibly -monly-2-regs) option.

Cheers,
Simon


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



multithreading with multiprocessing (Was: Concurrent and Posix libraries...)

2001-12-20 Thread Dean Herington

`forkProcess` creates an exact copy of the calling process, except for the
return value from `forkProcess` that allows for discriminating the parent
from the child.  In your example, there are two active threads at the time
`forkProcess` is done, so the new process has (copies of) the same two
active threads.  Then the race is on in the new process: depending on the
(unspecified) order of execution, the copy of the initial thread may get
to the `print` before its sibling thread gets to do `executeFile` (which
wipes away both existing threads).

This example raises a general problem (which, as it turns out, is relevant
to my current work).  How can one mix multithreading with
multiprocessing?  In particular, how can a threaded process safely create
another process to run a program?  Put another way, how can the
combination of `forkProcess` and `executeFile` be done atomically enough
so that existing threads in the forking process don't get in the way.

I read something on this topic (involving some sort of pervasive locking
strategy) recently, but can't recall where.  Anybody remember?

Dean Herington


Marcus Shawcroft wrote:

 Hi,

 I want to use a thread in concurrent haskell to manage a posix
 fork/exec/wait. I expected the test code attached below to output
 recovering result once, instead I get recovering result twice. Can
 anyone shed some light on whats going wrong?

 (ghci 5.02.1 x86 linux)

 Thanks
 /Marcus

  module Test where

  import Concurrent
  import Posix

  main = do
mv - newEmptyMVar
forkIO $ do x - forkProcess
  case x of
Nothing - do
  executeFile sleep True [2] Nothing
  error oops
Just pid -
  getProcessStatus True False pid
  putMVar mv ()
print recovering result
takeMVar mv


___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



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 - Integer - Double
 [..]
   | y   0= 1 / fromInteger x * powNeg x (y + 1)

 Initially I wanted something as terse as the Python version, now I either 
 have to write two functions or I need to define a type. Is there not an 
 easier way to come as close as possible to the Python version?

 Thanks anyway - learnt a lot!


For this particular task, the most natural solution is, probably,   

  pow :: Fractional a = a - Integer - a
  pow a n = 
   if n  0 then a^n  else (1/a)^(- n)

(^) is of standard, only  pow  adds the facility of negative n.

Then, you need each time to convert the argument to appropriate
type of Fractional: 

   pow (fromInteger 2 :: Ratio.Rational) 2 -- 4 % 1
   pow (fromInteger 2 :: Ratio.Rational) (-2)  -- 1 % 4
   pow (2 :: Double) (-2)  -- 0.25
   pow (2 :: Integer) (-2) --
   ... No instance for (Fractional Integer)

If you replace standard (and not lucky)  Fractional  with some 
class  Foo  (with multiplication  mul  and  division  div), 
make  Integer  an instance of  Foo  
(where  div  may fail for some data),
and program 
  pow :: Foo a = a - Integer - a
via  mul, div,
then it would work like this:

  pow (2 :: Integer)  2-- 4
  pow (2 :: Integer)  (-2) -- Error: cannot invert 2 :: Integer
  pow (2 :: Rational) (-2) -- 1%4

Another way is to try to straggle with overlapping instances by
defining something like this:

  class Pow a b where pow :: a - Integer - b

  instance Num a = Pow a a   where  pow = (^)
   Fractional ? 
  instance Num a = Pow Integer a where  pow = ?

If this succeeds, there will be also no need in new type 
constructors.

-
Serge Mechveliani
[EMAIL PROTECTED]





___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



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 = unsafePerformIO $ stToIO $
do x - readSTRef y
   writeSTRef y (x + 1)
   return x

 and in ghci it works wonderfully, but when i actually compile, all i get
 is \NUL0.

 what's the proper way to write this?

I think (haven't tested this one) you should write (modulo layout):
| curVarIdRef :: IORef Integer
| curVarIdRef = unsafePerformIO $ newIORef (0 :: Integer)
|
| {-# NO-INLINE newVar -}
|
| newVar :: () - String
| newVar = \_ - ('\0' : show x) where
|   x = unsafePerformIO $
| do x - readIORef curVarIdRef
|   writeIORef curVarIdRef (x + 1)
|   return x

Because in your original version, curVarId allocates a new reference to 0
every time newVar is called.

Hope this works, Jan de Wit





___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



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, 2002

 Dagstuhl, Germany


  CALL FOR PAPERS

Generic programming is about making programs more 
adaptable by making them more general. Generic 
programs often embody non-traditional kinds of 
polymorphism; ordinary programs are obtained from 
them by suitably instantiating their parameters. 
In contrast with normal programs, the parameters 
of a generic programs are often quite rich in 
structure. For example they may be other programs, 
types or type constructors, class hierarchies, or 
even programming paradigms. 

Generic programming techniques have always been of 
interest, both to practitioners and to theoreticians, 
but only recently have generic programming 
techniques become a specific focus of research in 
the functional and object-oriented programming 
language communities. This working conference will 
bring together leading researchers in generic 
programming from around the world, and feature 
papers capturing the state of the art in this 
important emerging area. 

We welcome contributions on all aspects, theoretical 
as well as practical, of generic programming, 
aspect-oriented programming, polytypic programming, 
adaptive object-oriented programming, generic 
components, and so on. 


SUBMISSION

Full papers should be submitted in Postscript or pdf 
format by e-mail to reach [EMAIL PROTECTED] 
by February 16, 2002. The details of the submission 
procedure can be found at


http://www.generic-programming.nl/wcgp/submit.html

Although there is no page limit, submissions should 
strive for brevity and clarity. 


  IMPORTANT DATES

Submission   February 16, 2002
Notification April 12,2002
Final version dueMay 24,  2002


PROGRAMME COMMITTEE

Matt Austern 
Eerke Boiten
Ulrich Eisenecker 
Jeremy Gibbons (co-chair)
Ralf Hinze 
Johan Jeuring (co-chair)
Gary Leavens 
Karl Lieberherr 
Lambert Meertens 
Eugenio Moggi 
Bernhard Moeller
Oege de Moor 
David Musser 
Martin Odersky 
Ross Paterson
Simon Peyton Jones
Colin Runciman
Doaitse Swierstra
Stephanie Weirich


  LOCAL ORGANISATION

Jeremy Gibbons
Johan Jeuring
Bernhard Moeller

   CORRESPONDENCE
  
Jeremy Gibbons ([EMAIL PROTECTED])
Johan Jeuring  ([EMAIL PROTECTED])



___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



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,

  Bernhard

___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



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 = unsafePerformIO (hPutStrLn stderr s) `seq` x

The hslibs docs say

If the I/O computation wrapped in unsafePerformIO performs side
effects, then the relative order in which those side effects take
place (relative to the main I/O trunk, or other calls to
unsafePerformIO) is indeterminate.

but it's not entirely clear on whether or not I could end up with 2
warnings interspersed?

And is it guaranteed that the warnings will be printed at some point?
hugs and ghci only seem to print the first warning, but ISTR similar
problems happen with threads and got the impression that they were in
the wrong.


Thanks
Ian


___
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell



Re: We need Documentation

2001-12-20 Thread Dmitry Astapov


 EO Hi Hal,
 EO On Thursday 13 December 2001 20:47, Hal Daume III wrote:
 I think we should move this off the mailing list.  I'm willing to
 spear-head such an effort.  Anyone who is interested in contributing,
 please email me.  I'll compile a list of people and we can figure out
 what we want to do.

 EO I think it's okay to discuss in haskell-cafe.
Well, original author decided to took discussion off-list ...

 EO I'd like to contribute too but I have little time nowadays trying to
 EO finish writing my msc. thesis. I do have a few suggestions though:

 EO 1. Using wiki does not seem to be a bad idea. You may also consider
 EO using a word processing system such as LaTeX though. It's easy to
 EO convert LaTeX to html and it yields very quality prints as you all
 EO know. However, for true collaboration wiki is the king. There is
 EO already a nice Haskell wiki appropriate for such a project IIRC.

But Wiki at haskell.org has many limitations :( Does someone know nice Wiki
interface which combines Wiki's ease of use and CVS-like revision
management and conflict resolution? Most implementations I've seen does not
seem to deal well with several ppl editing same page at once - changes
often got lost

-- 
Dmitry Astapov //ADEpt   E-mail: [EMAIL PROTECTED]
GPG KeyID/fprint: F5D7639D/CA36 E6C4 815D 434D 0498  2B08 7867 4860 F5D7 639D

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Haskell

2001-12-20 Thread Law




hi, how do I define this function:

tupleWithf :: [Int] - [(Int, 
Int)]

such that 

tupleWithf [x1,x2,.,xn]
= [ (f x1, x1), (f x2 x2),, (f xn, xn) 
]


Re: Haskell

2001-12-20 Thread Andrew Stribblehill

Quoting Law [EMAIL PROTECTED]:
 hi, how do I define this function:
 
 tupleWithf :: [Int] - [(Int, Int)]
 
 such that 
 
 tupleWithf [x1,x2,.,xn]
 = [ (f x1, x1), (f x2 x2),, (f xn, xn) ]
   ^ you wanted a comma there, I guess.

I don't see where you're getting `f' from. I think you want the type
to be:

tupleWithf :: (Int - Int) - [Int] - [(Int, Int)]

Still, you can do this with a trivial list comprehension or map. I
leave the implementation as an exercise for the reader.

-- 
IRISH SEA
NORTHEASTERLY BACKING WESTERLY 4, INCREASING 5 TO 7 PERHAPS GALE 8
LATER. OCCASIONAL RAIN LATER. GOOD

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe



Haskell

2001-12-20 Thread J Brown

hi, I am only a beginner of programming with Haskell,
how do I define each of the following:

* maxFirst :: (Int,Int) - (Int,Int) - (Int,Int) 

which returns, of its two input tuples, the one whose
first component is the highest.

* Define a function

maximumFirst :: [(Int,Int)] - (Int,Int)

which returns, from its list of input tuples, the
tuple whose first component is highest, assuming input
list is non-empty.

A function is given:

maxf :: [Int] - Int

such that if maxf [x1,,xn] = xi then

elem xi [x1,...,xn] == True
f xi = f x1
f xi = f x2
..
fxi = f xn

* How do you define the function maxf (above) which
returns the element of its non-empty input list for
which f is maximal.
*and to define a function minf which returns the
element from its non-empty input list for which f is
minimal.

*how do I define the function

maxIndexf :: [Int] - Int

such that if 

maxf xs = i

for non-empty xs, then

0 = i  length xs
f (x s !! i) = f (x s !! 0)
f (x s !! i) = f (x s !! 1)

f (x s !! i) = f (last xs)

that is it returns the index of the element of its
input list for which f is maximal.

__
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

___
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe