Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Testing external functions.

  • Loading branch information...
commit 4dd6a6ddbc9455c5ba5e951b819777e75001a903 1 parent 56d2278
@leepike authored
Showing with 12 additions and 2 deletions.
  1. +12 −2 Examples/ExtFuns.hs
View
14 Examples/ExtFuns.hs
@@ -16,13 +16,23 @@ nats :: Stream Word16
nats = [0] ++ nats + 1
func0 :: Stream Word16
-func0 = externFun "func0" [funArg $ externW8 "x", funArg nats]
+func0 = externFun "func0" [ funArg $ externW8 "x"
+ , funArg nats]
func1 :: Stream Bool
func1 = externFun "func1" []
+func2 :: Stream Word16
+func2 = externFun "func0" [ funArg $ constW8 3
+ , funArg $ constW16 4]
+
+a :: Stream Word16
+a = func0 + func0
+
spec :: Spec
-spec = trigger "trigger" true [ arg func0, arg func1 ]
+spec = trigger "trigger" true [ arg func0
+ , arg func1
+ , arg a ]
main :: IO ()
main = do
Please sign in to comment.
Something went wrong with that request. Please try again.