Commit 7c9a2e6f authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Add closure type

parent c0d17fb0
module Data.Array.Parallel.Base.Closure (
(:->)(..), closure, ($:)
) where
infixr 0 :->
infixr 0 $:
data a :-> b = forall e. Clo !(e -> a -> b) e
closure :: (e -> a -> b) -> e -> (a :-> b)
closure = Clo
($:) :: (a :-> b) -> a -> b
Clo f e $: x = f e x
...@@ -12,6 +12,7 @@ exposed-modules: ...@@ -12,6 +12,7 @@ exposed-modules:
Data.Array.Parallel.Unlifted Data.Array.Parallel.Unlifted
Data.Array.Parallel.Unlifted.Distributed Data.Array.Parallel.Unlifted.Distributed
Data.Array.Parallel.Unlifted.Parallel Data.Array.Parallel.Unlifted.Parallel
Data.Array.Parallel.Base.Closure
other-modules: other-modules:
Data.Array.Parallel.Base.Config Data.Array.Parallel.Base.Config
Data.Array.Parallel.Base.Debug Data.Array.Parallel.Base.Debug
......
...@@ -5,10 +5,11 @@ maintainer: ndp@cse.unsw.edu.au ...@@ -5,10 +5,11 @@ maintainer: ndp@cse.unsw.edu.au
exposed: True exposed: True
exposed-modules: exposed-modules:
Data.Array.Parallel, Data.Array.Parallel
Data.Array.Parallel.Unlifted, Data.Array.Parallel.Unlifted
Data.Array.Parallel.Unlifted.Distributed Data.Array.Parallel.Unlifted.Distributed
Data.Array.Parallel.Unlifted.Parallel Data.Array.Parallel.Unlifted.Parallel
Data.Array.Parallel.Base.Closure
hidden-modules: hidden-modules:
Data.Array.Parallel.Base.Config Data.Array.Parallel.Base.Config
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment