Re: Parsing date and time specifications

2002-12-20 Thread Ketil Z. Malde
Peter Simons [EMAIL PROTECTED] writes: CalendarTime [...] TimeDiff [...] I briefly looked at the Posix module [...] non-standard. *sigh* [...] Any suggestions what I could do? Yes. I think it is widely agreed that the time and date structures in the standard libraries are

Re: Interpret haskell within haskell.

2002-12-20 Thread John Hughes
On Fri, 20 Dec 2002, Matt Hellige wrote: [Christopher Milton [EMAIL PROTECTED]] --- David Sankel [EMAIL PROTECTED] wrote: I was wondering if there is any project that aims to interpret haskell within haskell. [... snipped intro to ghci ...] If you have defined functions in

Re: Interpret haskell within haskell.

2002-12-20 Thread Lauri Alanko
For what it's worth, I will probably be doing my MSc thesis on adapting eval (and reflection in general) to a statically typed language. Essentially you need a run-time representation of the environment and the typing context, and a type system which groks the relationship between run-time and

Tree insert, lookup with keys

2002-12-20 Thread Ingo Wechsung
Hi, perhaps I don't understand the type system fully yet: I want a tree that carrys some information of type s; data Tree s = TNil | Branch s Tree Tree; This is fine for String, Integer and other atomic types. ins :: Tree s - s - Tree s; ins Tnil s = Branch s Tnil Tnil; ins (Branch s l r) x =

Re: Tree insert, lookup with keys

2002-12-20 Thread Ketil Z. Malde
Ingo Wechsung [EMAIL PROTECTED] writes: class Keyed a where { -- Type a is keyed if it has a key function. key :: Ord b = a - b; -- key is a function, that, when applied to a yields some b that is comparable } But it isn't obvious what b is supposed to be. Try multi-parameter

AW: Tree insert, lookup with keys

2002-12-20 Thread Ingo Wechsung
Ketil wrote: But it isn't obvious what b is supposed to be. Sure, it must be an instance of Ord. In a way, I promise the compiler not to use anything but compare on b's. Of course, when I define n instances, there will be n different b-Types that must not be confused. (Requires -fglasgow-exts)

Re: Parsing date and time specifications

2002-12-20 Thread Ketil Z. Malde
Simon Marlow [EMAIL PROTECTED] writes: (My preju^H^Hference would be to store a date-time internally in a posix-like manner (seconds,microsecond since the epoch).) I'm still not sure I understand why the Time library is considered to be broken I was probably a bit quick on the trigger

Re: Interpret haskell within haskell.

2002-12-20 Thread Alastair Reid
John Hughes [EMAIL PROTECTED] writes: When I want to do this kind of thing, I use hugs as a back-end. I write the expressions I want to evaluate, or whatever, to a file of hugs commands, and then run system hugs hugsinput hugsoutput then read and process the output (choose your

Re: Tree insert, lookup with keys

2002-12-20 Thread Alastair Reid
I want a tree that carrys some information of type s; data Tree s = TNil | Branch s Tree Tree; ins :: Tree s - s - Tree s ... So far so good, however, I do not always want to compare everything. What I really want is to have (compare (key x) (key s)) instead in the definition of ins.

Re: Interpret haskell within haskell.

2002-12-20 Thread Frank Atanassow
Lauri Alanko wrote (on 20-12-02 11:26 +0200): For what it's worth, I will probably be doing my MSc thesis on adapting eval (and reflection in general) to a statically typed language. Essentially you need a run-time representation of the environment and the typing context, and a type system

Re: Interpret haskell within haskell.

2002-12-20 Thread David Sankel
--- Christopher Milton [EMAIL PROTECTED] wrote: --- David Sankel [EMAIL PROTECTED] wrote: I was wondering if there is any project that aims to interpret haskell within haskell. http://www.haskell.org/implementations.html quote type=partial GHC, the Glasgow Haskell Compiler The

RE: Parsing date and time specifications

2002-12-20 Thread Simon Marlow
I was probably a bit quick on the trigger there. Sorry! It't been a while since I tried using CalendarTime and friends; I did have some difficulty making things fit, and eventually gave up the whole thing. My impression (which may well be a wrong one) was that others also had trouble

Re: Parsing date and time specifications

2002-12-20 Thread Mark Carroll
On 20 Dec 2002, Ketil Z. Malde wrote: (snip) Since it's almost Christmas, I'd also like a way to specify things like first Tuesday of every month, or the day before (last Thursday of every month). And a GHC target for my Palm Pilot :-) We could build a really cool Cron replacement, and

Re: Parsing date and time specifications

2002-12-20 Thread Jerzy Karczmarczuk
Mark Carroll wrote: (Is all the world on a seven-day week? I wonder how that came about.) Gunpowder money. Merry Christmas. Jerzy Karczmarczuk Caen, France ___ Haskell-Cafe mailing list [EMAIL PROTECTED]

Re: Fail: loop ???

2002-12-20 Thread Hal Daume III
loop means that you have an infinite loop that the system was able to detect at runtime. basically what happens is you have some function which is about to get evaluated. this is essentially a node in a graph. the runtime system marks this node as i'm being evaluated. however, during the

Re: Interpret haskell within haskell.

2002-12-20 Thread Nicolas Oury
Hello, I am not sure to be relevant but I think : * This kind of thing would be very useful in Haskell, as this language has shown to be very usable to model foreign problems and do Domain Specific Language. It would, for example, allow to use a domain specific haskell script in an Haskell

Re: Interpret haskell within haskell.

2002-12-20 Thread oleg
David J. Sankel wrote: I was referring to a haskell interpreter to be used within haskell code. For instance: main = do user_configuration - parseHaskell title - resolveFunction user_configuration title :: String putStr title This was exactly the gist of the message: