Matching word boundaries in Text.Regexp
I would like to match word boundaries in a regular expression but this doesn't seem to work with Text.Regex in GHC 6.4.2. The regular expression looks something like: \\b(send|receive)\\b to match either the keyword send or the keyword receive but not the word sending. Neither works \ and \ for matching the beginning and end of a word. Thanks for any help, Bernd ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
ghci confused by hi files
I have observed the following weird behavior: When I define an instance of a certain MPTC in a separate module from the definition of the class, ghci's ability to recognize the methods of the class seems to vary depending on whether or not hi files exist for the modules. I am using the current Debian build of GHC 6.6. Below are a set of three files that reproduce the behavior, and a shell session that demonstrates it. Before I compile the program, ghci works fine. After I compile with ghc - thus generating hi files - ghci gets confused. Then I delete the hi files and everything is fine again. Thanks, Yitz -- File Oops.hs {-# OPTIONS_GHC -fglasgow-exts #-} module Oops where class Oops a b c | a - b c where foo :: a - b - a -- File Whoops.hs {-# OPTIONS_GHC -fglasgow-exts #-} module Whoops where import Oops instance Oops String Int Bool where foo x n = show (x, n) -- File runWhoops.hs module Main where import Whoops import Oops main = putStrLn $ foo bar 42 $ ghci Whoops / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. Loading package base ... linking ... done. [1 of 2] Compiling Oops ( Oops.hs, interpreted ) [2 of 2] Compiling Whoops ( Whoops.hs, interpreted ) Ok, modules loaded: Oops, Whoops. *Whoops foo baz 7 (\baz\,7) *Whoops Leaving GHCi. $ ghc --make runWhoops.hs [1 of 3] Compiling Oops ( Oops.hs, Oops.o ) [2 of 3] Compiling Whoops ( Whoops.hs, Whoops.o ) [3 of 3] Compiling Main ( runWhoops.hs, runWhoops.o ) Linking runWhoops ... $ ghci Whoops / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. Loading package base ... linking ... done. Ok, modules loaded: Oops, Whoops. Prelude Whoops foo baz 7 interactive:1:0: Not in scope: `foo' Prelude Whoops Leaving GHCi. $ rm *.hi $ ghci Whoops / /_\// /_/ / / | | GHC Interactive, version 6.6, for Haskell 98. Loading package base ... linking ... done. [1 of 2] Compiling Oops ( Oops.hs, interpreted ) [2 of 2] Compiling Whoops ( Whoops.hs, interpreted ) Ok, modules loaded: Oops, Whoops. *Whoops foo baz 7 (\baz\,7) ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: No intellisense in Visual Haskell
Visual Haskell is sensitive to the file name - module name mapping. For the case of Main there could be only one module with this name for a given package and I usually name it Main.hs. For the case of Main there could be a special handling in Visual Haskell because the Cabal description keeps its file name but this is not implemented at the moment. Cheers, Krasimir On 1/15/07, Sittampalam, Ganesh [EMAIL PROTECTED] wrote: OK, I found the problem while trying to make a cut-down test case. I had a module called Main, but the file was called FooMain.hs - this was causing all the intellisense for every project in my solution to break. I've worked round it by renaming my module to FooMain and passing -main-is in the GHC options, but I'd be inclined to view this as a bug, as I think this is a fairly standard way of working with modules - what do you think? Cheers, Ganesh -Original Message- From: Krasimir Angelov [mailto:[EMAIL PROTECTED] Sent: 15 January 2007 16:48 To: Sittampalam, Ganesh Cc: Pepe Iborra; GHC users Subject: Re: No intellisense in Visual Haskell It could help if you can provide an example that breaks the intellisense of Visual Haskell. It doesn't depend on the project size but perhaps you have found a bug in it. Cheers, Krasimir On 1/15/07, Sittampalam, Ganesh [EMAIL PROTECTED] wrote: Sorry, I forgot to make clear that the project builds fine from inside the IDE. -Original Message- From: Pepe Iborra [mailto:[EMAIL PROTECTED] Sent: 15 January 2007 16:06 To: Sittampalam, Ganesh Cc: 'GHC users' Subject: Re: No intellisense in Visual Haskell Ganesh, In my experience as a user, it seems that Intellisense stops working in presence of compilation errors. Have you checked this? Cheers pepe On 15/01/2007, at 17:00, Sittampalam, Ganesh wrote: Hi, I've installed Visual Haskell and am having some trouble with the Intellisense functionality. It works fine on a small project I start from scratch, but doesn't work at all for a bigger project (no tooltips, Go to Definition doesn't work, etc etc). Is there any way to debug this? Cheers, Ganesh == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users == Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html == ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Re: HEAD ghci crash on ppc OS X
Argh ... gmail totally mangled that patch. (The line that starts with loadObj(image) needs to be part of the previous line). I've put an unmangled version online at http://cass166.ucsd.edu/~david/link-patch ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users