Re: [Haskell-cafe] generate Haskell code from model

2007-04-14 Thread Brian Smith
On 4/14/07, Steffen Mazanek [EMAIL PROTECTED] wrote: Brian, but don't you think that you have to write a lot of boilerplate code in Haskell? I have never felt I was writing a lot of boilerplate. There are a lot of abstraction mechanisms in Haskell to avoid boilerplate. Second, if Haskell

Re: [Haskell-cafe] generate Haskell code from model

2007-04-13 Thread Brian Smith
On 4/13/07, Steffen Mazanek [EMAIL PROTECTED] wrote: Hello everybody, I would like to start a discussion on how to generate best-practice Haskell code from a model, e.g. from EMF. I started learning Haskell precisely to solve problems like this. But, once I got into it, I realized that

Re: [Haskell-cafe] Haskell vs Ruby as a scripting language

2007-02-10 Thread Brian Smith
On 2/10/07, Joel Reymont [EMAIL PROTECTED] wrote: Is anyone using Haskell as a scripting language in their app? I'm thinking of viable it would be to embed ghc in a Mac (Cocoa) app. Is your application primarily written in Haskell? If not, you would have to create an interface between that

[Haskell-cafe] Embedding ghc

2007-02-10 Thread Brian Smith
If you have to ask, you can't afford it. :) The GHC API is not modular--if you use it, then the entirety of GHC is included into your program. That means that your executable will increase by the size of ghc.exe. Furthermore, you will also need to ship several of the supporting executables,

[Haskell-cafe] Re: Configurations proposal

2006-10-24 Thread Brian Smith
On 10/24/06, Duncan Coutts [EMAIL PROTECTED] wrote: On the other hand, in Gtk2Hs I know one case where we do this. We have aGraphics.UI.Gtk.Cairo api module that is only included if Gtk was builtagainst Cairo. In any case it could be faked by using cpp to just not export anything rather than not

Re: [Haskell-cafe] Re: Read a single char

2006-10-23 Thread Brian Smith
On 10/23/06, Neil Mitchell [EMAIL PROTECTED] wrote: HigetChar doesn't return until I press Enter. I need something that returns immediately after I press any key.It's a problem with buffering:hSetBuffering stdin NoBuffering This usually doesn't work on Windows:GHC 6.4.2 and 6.6: requires enterHugs

Re: [Haskell-cafe] Re: A better syntax for qualified operators?

2006-10-19 Thread Brian Smith
On Wed, Oct 18, 2006 at 04:42:00PM +0100, Simon Marlow wrote: So you won't be able to colour patterns differently from expressions, that doesn't seem any worse than the context vs. type issue.Indeed, I'm not even sure you can colour types vs. values properly, look at this: data T = C [Int] at

Re: [Haskell-cafe] Writing forum software in Haskell

2006-09-25 Thread Brian Smith
On 9/24/06, David House [EMAIL PROTECTED] wrote: Hi all.The recent thread on email vs. forums inspired a bit of interest toget some forum software on haskell.org. Were we to go ahead with this,I think it'd be great to have this software written in Haskell itself. If you were to write all-new

Re: [Haskell-cafe] Are associated types synonyms like type classes?

2006-09-02 Thread Brian Smith
Bulat, Stefan,My question wasn't clear. I understand already that classes with associated types are are alternative to MPTC with fundeps.When using AT then we have to decide what part of the abstraction is the class and what part is the associated type. Sometimes this seams arbitrary. If we have:

[Haskell-cafe] Are associated types synonyms like type classes?

2006-09-01 Thread Brian Smith
I read the easy parts of the Associated Types with Class and Associated Type Synonyms papers. An associated type synonym seems to kind of work similarly to a restricted form of class. In what way are the two following examples different? -- define a class with a type synonym, and a set of

Re: [Haskell-cafe] Proposal to allow {} instead of () in contexts

2006-08-23 Thread Brian Smith
On 8/23/06, Brian Hulley [EMAIL PROTECTED] wrote: Hi -Disregarding my last proposal which involved the use of {} in types, I amwondering if anyone would agree with me that it would be a good idea to use{} instead of () when writing out the context ie: foo :: (Num a, Bar a) = a - awould become:foo

Fwd: [Haskell-cafe] A restricted subset of CPP included in a revisionof Haskell 98

2006-08-21 Thread Brian Smith
On 8/20/06, Brian Hulley [EMAIL PROTECTED] wrote: Henning Thielemann wrote: On Thu, 17 Aug 2006, Brian Smith wrote: I find it strange that right now almost every Haskell program directly or indirectly (through FPTOOLS) depends on CPP, yet there is no effort to replace CPP with something better

Re: [Haskell-cafe] Description of Haskell extensions used by FPTOOLS

2006-08-21 Thread Brian Smith
] [mailto: [EMAIL PROTECTED]] On Behalf Of Brian Smith Sent: 17 August 2006 17:01 To: haskell-cafe@haskell.org Subject: [Haskell-cafe] Description of Haskell extensions used by FPTOOLS Is there any design document for the FPTOOLS libraries or some description of language features

[Haskell-cafe] Description of Haskell extensions used by FPTOOLS

2006-08-17 Thread Brian Smith
Is there any design document for the FPTOOLS libraries or some description of language features that are (allowed to be) used in them?I am going to be taking some significant time off from my normal jobs in the upcoming months. During part of that time, I would like to do some work to improve the

[Haskell-cafe] A restricted subset of CPP included in a revision of Haskell 98

2006-08-17 Thread Brian Smith
Hi, I find it strange that right now almost every Haskell program directly or indirectly (through FPTOOLS) depends on CPP, yet there is no effort to replace CPP with something better or standardize its usage in Haskell. According to the following document, and my own limited experience in reading

Re: [Haskell-cafe] A restricted subset of CPP included in a revision of Haskell 98

2006-08-17 Thread Brian Smith
On 8/17/06, John Meacham [EMAIL PROTECTED] wrote: On Thu, Aug 17, 2006 at 11:44:17AM -0500, Brian Smith wrote: Hi, I find it strange that right now almost every Haskell program directly or indirectly (through FPTOOLS) depends on CPP, yet there is no effort to replace CPP with something better

Re: [Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-17 Thread Brian Smith
Hi Neil,On 7/17/06, Neil Mitchell [EMAIL PROTECTED] wrote: Hi Brian,You sent this email just to me, and not to the list. If you indendedto send to the list then feel free to forward my bits on to the list. I know that FilePath is defined by Haskell '98 as a String and so it cannot be changed. So,

[Haskell-cafe] RE: ANN: System.FilePath 0.9

2006-07-16 Thread Brian Smith
[ I tried to send this through the fa.haskell USENET group but apparently it did not go through]I kind of expect that a Haskell library for file paths will use the type system to ensure some useful properties about the paths. For example, when writing security-conscious software I often want to

Re: [Haskell-cafe] Updating the Haskell Standard

2005-07-21 Thread Brian Smith
On 7/20/05, John Goerzen [EMAIL PROTECTED] wrote: There was a brief discussion on #haskell today about the Haskell standard. I'd like to get opinions from more people, and ask if there is any effort being done in this direction presently. I think an updated standard is overdue. I find it

[Haskell-cafe] Cabal with Alex and and Happy

2005-06-13 Thread Brian Smith
Is there an example of how to build a Cabal package that has a lexer generated with Alex and a parser generated with Happy? As far as I can tell, the way to do this is to add Other-Modules: Module.Name.Of.Parser.y Module.Name.Of.Lexer.x to each executable/library stanza. But, when I try this, I

[Haskell-cafe] Visual Hashell Studio.NET 2005

2005-06-05 Thread Brian Smith
Hi, When will VHS support the Visual Studio.NET 2005 Beta? I'd like to volunteer to test VHS.NET 2005 when it is available. (Also, MS is giving away the VS.NET 2005 beta for free, and VS.NET 2003 costs a whopping $15.00 from my school's bookstore). Thanks, Brian

Re: [Haskell-cafe] Re: OCaml list sees abysmal Language Shootout results

2004-10-11 Thread Brian Smith
On Mon, 11 Oct 2004 14:16:36 -0700, John Meacham [EMAIL PROTECTED] wrote: n Mon, Oct 11, 2004 at 12:22:13PM +0100, Malcolm Wallace wrote: So is it fair to compare the default lazy Haskell solution with all the eager solutions out there that laboriously do all this unnecessary work?

[Haskell-cafe] Control.Monad.Error with a custom error type

2004-08-14 Thread Brian Smith
I have: data Reference = Ref [String] String data ReferenceError = RefError { expectedType :: String -- type of element we were looking for (e.g. type,package) , pointOfError :: Reference-- path to deepest parent element not found in path } type