mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-09-11 22:17:18 +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)
|
||||
>
|
||||
> -- 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 ->
|
||||
> VNumPoly $ \_ ->
|
||||
> VFun $ \_s -> cryError (UserError "error") a)
|
||||
|
Loading…
Reference in New Issue
Block a user