> To my 
> 
> >> Panic! ...
> >>   #define C CRP
> >>   data R a = CRP a 
> >>   f  (C x) = x
> >>   f' (C x) = x
> >>
> >> f  compiles and  f'  do not!
> 
> 
> Simon Marlow  writes 
        [ a lot of rubbish ]
> 
> I am sorry for confusion.
> ghc  does not panic. And, probably, compiles right (?).
> This is me who panics.
> Because i do not know how to use  #define  directive in the programs
> that contain the names like  f',  f'gh, ...
> 
> For i expected above  cpp  to replace C with CRP before compilation.
> And it cannot do this due to (') usage - right?
> 
> It looks like  cpp  expects (') to be closed by another ('), otherwise
> it is a  cpp  error.

I misunderstood the problem.  This should work:

   #define C CRP
   data R a = CRP a 
   f  (C x) = x
   f'{-'-} (C x) = x

I often have to do this sort of thing so that emacs gets the colors right
:-)

Cheers

-- 
Simon Marlow 
Microsoft Research Ltd., Cambridge, U.K.

Reply via email to