Re: GHC rewrite rules pragma

2008-05-27 Thread Jan Jakubuv
thanks, it works fine now. 2008/5/27 Don Stewart <[EMAIL PROTECTED]>: > jakubuv: >> Thanks lot, it works now. Now, I have just a simple question: >> >> Is there any chance to make rewriting working in ghci ? > > I think you can actually enable them by putting: > > {-# OPTIONS -frewrite-rules #-}

Re: GHC rewrite rules pragma

2008-05-27 Thread Don Stewart
jakubuv: > Thanks lot, it works now. Now, I have just a simple question: > > Is there any chance to make rewriting working in ghci ? I think you can actually enable them by putting: {-# OPTIONS -frewrite-rules #-} at the top of the file to be interpreted. Works for me, anyway. -- Don _

Re: GHC rewrite rules pragma

2008-05-27 Thread Jan Jakubuv
Thanks lot, it works now. Now, I have just a simple question: Is there any chance to make rewriting working in ghci ? jan. 2008/5/27 Don Stewart <[EMAIL PROTECTED]>: > jakubuv: >> Hi, >> >> I'm trying to find out how the GHC rewrite rules pragma work, but I'm >> not able to make it working. I ha

Re: GHC rewrite rules pragma

2008-05-27 Thread Don Stewart
jakubuv: > Hi, > > I'm trying to find out how the GHC rewrite rules pragma work, but I'm > not able to make it working. I have this simple example, where I would > like to specialize the function gen to spec on strings: > > {-# OPTIONS -O2 -fglasgow-exts #-} > > gen :: [a] -> a > gen = head > >

GHC rewrite rules pragma

2008-05-27 Thread Jan Jakubuv
Hi, I'm trying to find out how the GHC rewrite rules pragma work, but I'm not able to make it working. I have this simple example, where I would like to specialize the function gen to spec on strings: {-# OPTIONS -O2 -fglasgow-exts #-} gen :: [a] -> a gen = head {-# RULES "gen/Char" gen=spec #-