mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-30 23:45:23 +03:00
Add a trivial "parmap" implementation to the reference interpreter.
This commit is contained in:
parent
7b0f69de28
commit
0d7d98bcfb
Binary file not shown.
@ -804,6 +804,16 @@ by corresponding typeclasses
|
|||||||
> diff = y - x)
|
> diff = y - x)
|
||||||
>
|
>
|
||||||
> -- Miscellaneous:
|
> -- Miscellaneous:
|
||||||
|
> , ("parmap" , VPoly $ \_a ->
|
||||||
|
> VPoly $ \_b ->
|
||||||
|
> VNumPoly $ \n ->
|
||||||
|
> VFun $ \f ->
|
||||||
|
> VFun $ \xs ->
|
||||||
|
> -- Note: the reference implementation simply
|
||||||
|
> -- executes parmap sequentially
|
||||||
|
> let xs' = map (fromVFun f) (fromVList xs) in
|
||||||
|
> VList n xs')
|
||||||
|
>
|
||||||
> , ("error" , VPoly $ \a ->
|
> , ("error" , VPoly $ \a ->
|
||||||
> VNumPoly $ \_ ->
|
> VNumPoly $ \_ ->
|
||||||
> VFun $ \_s -> cryError (UserError "error") a)
|
> VFun $ \_s -> cryError (UserError "error") a)
|
||||||
|
Loading…
Reference in New Issue
Block a user