[Haskell-cafe] Best way to find an undefined error?

2008-02-14 Thread Scott West
Hello all, Does anyone favourite technique to track down an undefined call? I'm 99% sure that my code is not the offender (I've grepped for undefined occurrences and turned them all into error calls). Supposing that this is happening in some other package or library that I'm using, what is the

Re: [Haskell-cafe] Best way to find an undefined error?

2008-02-14 Thread Scott West
On Thu, Feb 14, 2008 at 3:02 PM, Denis Bueno [EMAIL PROTECTED] wrote: On Thu, Feb 14, 2008 at 2:55 PM, Don Stewart [EMAIL PROTECTED] wrote: You can use the profiler to get a stack trace, or use the new GHCi debugger to step backwards from the exception to the source. I wrote a bit

Re: [Haskell-cafe] Best way to find an undefined error?

2008-02-14 Thread Scott West
On Thu, Feb 14, 2008 at 4:43 PM, Don Stewart [EMAIL PROTECTED] wrote: saynte: On Thu, Feb 14, 2008 at 3:02 PM, Denis Bueno [EMAIL PROTECTED] wrote: On Thu, Feb 14, 2008 at 2:55 PM, Don Stewart [EMAIL PROTECTED] wrote: You can use the profiler to get a stack trace, or use the new

Re: [Haskell-cafe] Best way to find an undefined error?

2008-02-14 Thread Scott West
On Thu, Feb 14, 2008 at 5:12 PM, Scott West [EMAIL PROTECTED] wrote: On Thu, Feb 14, 2008 at 4:43 PM, Don Stewart [EMAIL PROTECTED] wrote: saynte: On Thu, Feb 14, 2008 at 3:02 PM, Denis Bueno [EMAIL PROTECTED] wrote: On Thu, Feb 14, 2008 at 2:55 PM, Don Stewart [EMAIL

Re: [Haskell-cafe] gtk2hs and GTK+OSX

2008-10-14 Thread Scott West
Hi Jeroen, I've done this. I didn't use the stuff from gtk-osx.org, but rather from the imendio site itself. I'm not sure how it would work with binary package they now provide, but if you use their jhbuild scripts you get something usable. It's ugly, but it works for compiled gtk2hs programs. If

[Haskell-cafe] How to hold common data

2004-05-12 Thread scott west
Hello all, I'm new to haskell and was just wondering if there was any efficient or standard way to store and modify some sort of state data. The functional nature of haskell has me confused in this respect! Basically what I want to achieve is an interactive program that allows you to edit

Re: [Haskell-cafe] How to hold common data

2004-05-12 Thread scott west
MR K P SCHUPKE wrote: simplest way... use a recursive function that feeds itself the state as one of its arguments... Mmm, yes I had thought of that. But I wasn't sure how it would work, as you can't have variables in the same sense as imperative languages. So if I create a mainloop sort of

[Haskell-cafe] c2hs and gtk+hs problem

2004-05-18 Thread scott west
Hello all, I've recently attempted to get the gtk+hs bindings operational, with evidently no success. They both compile fine, but when trying to make all the examples in the gtk+hs tree, it gives up with: /usr/local/lib/c2hs-0.12.0/ghc6/libc2hs.a(C2HS.o)(.text+0x32): In function

[Haskell-cafe] Existential type within a record ... bad?

2004-07-27 Thread Scott West
Hello all, Just got an interesting error, which I can't really understand (but that DOES happen a lot...). Trying to work with existention types, record types, and wrapping the whole thing up in a nice IORef for my uses: data ETable = forall a. EditableTable a = ETable a data GuiRecord

[Haskell-cafe] Question about HList possibilities

2007-06-25 Thread Scott West
Hello all, Given an HList (http://homepages.cwi.nl/~ralf/HList/) would it be possible to do the following: Create a class/function/magicks that would essentially do what hOccursMany does, except it would not return a list of elements, but a new HList. For example, would this allow us to be able

[Haskell-cafe] Class Interfaces in OOHaskell?

2007-07-06 Thread Scott West
Hello all, Looking at the OOHaskell black (grey?) magic, and wondering if there would be an interesting way to construct class interfaces using the OOHaskell paradigm? I'm trying to do it as so (assume relevant types/proxies declared): type FigureInter = Record ( Draw :=: IO ()

[Haskell-cafe] Re: Class Interfaces in OOHaskell?

2007-07-06 Thread Scott West
, but is there a nice way to get around it? I think I could wrap them up in a datatype (ie, data InterOne = InterOne Inter1, and modify definitions accordingly) but are there any alternative methods? Scott On 7/6/07, Scott West [EMAIL PROTECTED] wrote: Hello all, Looking at the OOHaskell black

[Haskell-cafe] Dealing with large OOHaskell records

2007-07-24 Thread Scott West
Hello all, Does anyone have any experience with using large-ish (20 element) OOHaskell records? I'm finding that as the records get large, compile times get fairly ridiculous. Is there some explicit typing I should be doing to help the type-checker? Thanks! Scott