projects
/
matthijs
/
master-project
/
cλash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d19c35
)
Add a stateless circuit type.
author
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Fri, 30 Jan 2009 09:23:49 +0000
(10:23 +0100)
committer
Matthijs Kooijman
<m.kooijman@student.utwente.nl>
Fri, 30 Jan 2009 09:24:25 +0000
(10:24 +0100)
Sim.hs
patch
|
blob
|
history
diff --git
a/Sim.hs
b/Sim.hs
index c87f7605e727bed37e47898e9feb8346d36ea607..3848508c220b942412a3b9dd27b640abcb852e54 100644
(file)
--- a/
Sim.hs
+++ b/
Sim.hs
@@
-1,4
+1,4
@@
-module Sim (simulate, SCircuit, simulateIO) where
+module Sim (simulate, SCircuit,
Circuit,
simulateIO) where
import Data.Typeable
simulate f input s = do
@@
-13,6
+13,7
@@
simulate f input s = do
-- A circuit with input of type a, state of type s and output of type b
type SCircuit i s o = i -> s -> (s, o)
+type Circuit i o = i -> o
run :: SCircuit i s o -> [i] -> s -> [(i, o, s)]
run f (i:input) s =