RE: Block simulation / audio processing

2000-05-19 Thread Mike Jones
Paul, I took a cursory look at your book. Am I correct in saying that the way time is handled is by a function that gets the current time and functions that calculate the state of the system at the time given by that call? So in FRP, time is continuous, but the points of calculation are not contr

RE: Block simulation / audio processing

2000-05-18 Thread Mike Jones
Jerzy, 1. Block simulators, dataflow interfacing etc... People mentiond FRAM, but somehow I missed (improbable that nobody fired the *obvious* keyword here): HAWK!!! See the Haskell Home page, you find all about. This is exactly what I have been looking at. My be problem is how to dynam

Block simulation

2000-05-11 Thread Mike Jones
Hi, Has anyone built any block simulators (for modeling continuous electronic systems, like OP Amps, RC networks, etc) in Haskell? If so, any website URLs would be of help to me. Mike

RE: Showing tuples

2000-05-09 Thread Mike Jones
Sven, That explains it. My tuples are of size 20. Thanks, Mike Deriving works, but GHC currently only contains instance declarations for tuples up to 5 elements, so you have to write you own boring instances for larger ones. *yawn* Cheers, Sven -- Sven Panne

RE: Showing tuples

2000-05-09 Thread Mike Jones
Chris, Yes, I do derive Show for MyData. I was surprised it did not work. Mike -Original Message- From: Chris Angus [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 09, 2000 12:57 AM To: 'Mike Jones'; [EMAIL PROTECTED] Subject: RE: Showing tuples Do you derive Show

Showing tuples

2000-05-08 Thread Mike Jones
Hi, I am having trouble with Show and tuples. I have a data structure, say: data MyData = ... And a value, say: value = (MyData..., MyData..., MyData) Then try to: show value I get a compiler message from ghc 4.05 that says: No instance for `Show (MyData, MyData, MyData)... What is the b

Show class on ADT with function

2000-05-05 Thread Mike Jones
Hi, I want to put a function in an ADT and make the ADT an instance of Show. Like the following small example: data Fn = Fn (Float -> Float) Int deriving Show But, I get the error from GHC as follows: Stimulus.hs:12: No instance for `Show (Float -> Float)' When deriving classes

RE: Changing <- to :=

2000-04-28 Thread Mike Jones
they don't care how I build my prototypes, which means Haskel, and Eiffel. Thanks for the help. Mike -Original Message- From: Thimble Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, April 28, 2000 7:26 PM To: Mike Jones Cc: [EMAIL PROTECTED] Subject: Re: Changing <- to := On Fri, Ap

Changing <- to :=

2000-04-28 Thread Mike Jones
All, Is there a way to define (:=) to be (<-) in the context of a do? This would then allow: result = do initialize vi1 := Vi.create Vi.setValue vi1 5.5 Vi.enable vi1 vi2 := Vi.create Vi.setValue vi2 6.0 cond1 (isnt (Vi.enabled vi2)) (Vi.se

Derived class problem

2000-04-27 Thread Mike Jones
All, I am having a problem with a derived class. I define: class (Monad m) => InstrumentMonad m where yuck :: a -> m a Then I define: instance InstrumentMonad Vi where (Line 30) return a = Vi (\s -> (s, a)) Vi sf0 >>= f = Vi $ \s0 ->

State Monad operators accross different monads

2000-04-26 Thread Mike Jones
I am trying to invent an embeeded language for measurement instruments. To do this, I modeled an instrument after the robot language in The Haskell School of Expression. For my instrument: newtype Vi a = Vi (ViState -> (ViState, a)) I have defined: (||*) :: Vi Bool -> Vi Bool -> Vi Bool b1 ||*

RE: Use of irrefutable

2000-04-20 Thread Mike Jones
Let me explore this a bit: lazyMap ~(x:xs) = f x : lazyMap f xs Now you tell the compiler that the list you are constructing is infinite. Moreover, you can inspect the *result* of the function before it ever evaluates its argument! What exactly do you mean by inspect the result before the eva

Use of irrefutable

2000-04-19 Thread Mike Jones
Hi, I have a rather naive question, being new to Haskell. I am looking at the Hawk Signal module, where the following definition occurs: lift1 f (List xs) = List $ lazyMap f xs where lazyMap f ~(x:xs) = f x : lazyMap f xs Now setting aside how the function is used in Hawk, I ran a l