Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-23 Thread Patrick Browne
Sameer, I think that my Maude to Haskell translation was a bit too literal and naive. But your reply helped me gain further insight to both languages, which is essentially my current research task.   Thanks, Pat On 12/23/11, Sameer Sundresh wrote:On Wed, Dec 21, 2011 at 10:12 AM, Patrick Br

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-22 Thread Sameer Sundresh
On Wed, Dec 21, 2011 at 10:12 AM, Patrick Browne wrote: > > On 21/12/11, *Richard O'Keefe * wrote: > > So what exactly is the program supposed to do? > > I am trying to see whether Haskell modules can be used for blending[1]. The > original MAUDE [2,3] program just sets up an arbitrary meeting p

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-21 Thread Patrick Browne
On 21/12/11, Richard O'Keefe wrote:So what exactly is the program supposed to do?  I am trying to see whether Haskell modules can be used for blending[1].  The original MAUDE [2,3] program just sets up an arbitrary meeting point, which is assumed to be time-2 and location-2. Then in MONK_MEETS_

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-20 Thread Richard O'Keefe
On 21/12/2011, at 4:34 AM, Patrick Browne wrote: > I have simplified the code using constructors and export. > I can evalute the qualified expressions but I do not get the expected results. > > module MONKONMOVE (module MONKONMOVE)where When I see "MONKONMOVE" I think "what's a MONKON?" Even

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-20 Thread Patrick Browne
I have simplified the code using constructors and export.I can evalute the qualified expressions but I do not get the expected results.module  MONKONMOVE (module MONKONMOVE)wheredata  Monk =  Monk | Monku | Monkd deriving (Show,Eq)data  TimeOfDay =   TimeOfDay | Timeu1 | Timeu2 | Timeu3 | Timed1 |

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-20 Thread Patrick Browne
On 12/20/11, Paul Johnson wrote:You definitely don't need the type class, and you don't need instances.I have removed the type class and instances.I have placed the location function in MONKONMOVEUP  and MONKONMOVEDOWNNow I can at least access the functions and some of values. For exampleMONKMEET

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-20 Thread Patrick Browne
On 12/20/11, Paul Johnson wrote:I think you need to rethink the solution: Haskell is not a logic programming language. Yes of course, but I suspect that the problems are due to issues of scope and modularity rather than problems of a logical nature The main equation for meets does give the app

Re: [Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-20 Thread Paul Johnson
On 20/12/11 10:16, Patrick Browne wrote: Hi, I am trying to implement a set of 4 modules that blend the action of a monk moving up a mountain on day 1 and returning down by the same path on day 2 [1][2]. The code should reflect the fact that there is some time and place which is common to the

[Haskell-cafe] The Riddle of the Buddhist Monk

2011-12-20 Thread Patrick Browne
Hi,I am trying to implement a set of 4 modules that blend the action of a monk moving up a mountain on day 1 and returning down by the same path on day 2 [1][2]. The code should reflect the fact that there is some time and place which is common to the two days where the monk would *meets himself*.