?

Log in

No account? Create an account

Multi-culturalism - John C. Kirk

Oct. 11th, 2006

12:55 am - Multi-culturalism

Previous Entry Share Next Entry

Comments:

[User Picture]
From:pozorvlak
Date:October 11th, 2006 04:11 pm (UTC)
(Link)
Damn, you're right. Remove the final "pub", and I think we're in business.

I'm well impressed with you writing a subsys-evening-out parser so quickly, though :-)
(Reply) (Parent) (Thread)
[User Picture]
From:totherme
Date:October 12th, 2006 09:57 am (UTC)
(Link)
Yup - here we go :)
Main> pre (pre (pre Curry Pub) Pub) (pre Curry (pre Curry Pub))
Ordering (Ordering (Ordering Pub Curry) Curry) (Ordering Pub (Ordering Pub Curry))


...and I think that is a unique legal parsing. Haskell won't find it for me by default though, because it's more useful to have
pre pre -> _|_
than do embark on a search of possible application orders till you find one that works. Perhaps perl 7 will do that though ;)

Oh - and I didn't write a parser - just a type and a function, as you see above. All the parsing you see here was done either by hugs trying to evaluate expressions containing that function, or by hand. Or a sort of trial and error combination of the two. I actually tried about three paren-combinations before realising that the previous expression was invalid for example ;)

Does this count as a night-out DSL implemented in haskell?
(Reply) (Parent) (Thread)