Re: [Haskell-cafe] Atom - help.

2009-11-27 Thread Tom Hawkins
On Fri, Nov 27, 2009 at 6:52 AM, miaubiz wrote: > > would the way you implemented random in Unit.hs work here? an external > variable whose name is the function that returns input. Yes, but you have to be a little careful. If in the same rule you reference 'heading' multiple times, or create ano

Re: [Haskell-cafe] Atom - help.

2009-11-26 Thread miaubiz
would the way you implemented random in Unit.hs work here? an external variable whose name is the function that returns input. compass :: Atom (E Int16) compass = int16' "readCompass()" >>= (return . value) something <- int16' "something" period 1 $ atom "navigate" $ do heading <- compass so

Re: [Haskell-cafe] Atom - help.

2009-06-13 Thread Tom Hawkins
Calling foreign functions that return values is problematic for the compiler -- I haven't invested enough time to come up with a good solution. The work around is to assign the result to an external variable.  The drawback is the result will not be available until the rule executing the action has

[Haskell-cafe] Atom - help.

2009-06-13 Thread Radamés Ajna
hi there, I've been working with haskell and atom dsl, however I'm new to haskell.. John Van Enk inspired me with programming arduino->atmegas , with haskell, So here is my problem. With an action , action :: ([String] -> String) -> [UE] -> Atom () , it's possible make calls to some precoded C fun