¿Necesito instalar alguna biblioteca adicional para usar Array.Parallel.map en F # ejecutándose en Mono?

I built mono-2.10.2 from source and installed the fsharp packages from http://fsxplat.codeplex.com/. But I have this program which runs without error on Windows but not on Linux/Mono. It complains about the following error:

error FS0039: The value, onstructor, namespace or type 'Parallel' is not defined

The parallel extensions seem to be still missing.

preguntado el 09 de marzo de 12 a las 16:03

While this may seem like an obvious question to you, it's not obvious to us. 1.) Share some source 2.) Which instructions did you follow when you installed F#? 3.) Which version of Mono did you pull--the tip of the tree or a stable release? -

What Mono version do you have? -

On Windows, I can do Array.Parallel.map ((+) 2) [| 1 |];; directly on F# interactive fsi.exe, but not on Linux. I installed the fsharp packages from fsxplat.codeplex.com. I believe the parallel extensions are not installed properly? Not sure how to check. -

Latest mono-2.10.2.tar.bz2 from ftp.novell.com/pub/mono/sources-stable. -

You're probably right that parallel extensions are missing. Check it in fsi escribiendo open System.Threading.Tasks;;. ¿Por qué no usas package releases? Mono 2.10.x package releases include F# already. -

1 Respuestas

En principio, no.

He instalado Mono 2.10.4 package release which includes F# package by default. Parallel extensions are working fine so I can use Array.Parallel.map.

In your case, my guess is that fsharp package is outdated and doesn't include parallel extensions. You should install F# from source by using the up-to-date and Mono-friendly version in gitHub. A detailed instruction of doing so could be found aquí.

respondido 12 mar '12, 20:03

(fragmentation of fsharp code and extensions is quite a puzzle) - Nicolas

@pad indeed the fsharp package did not include the parallel extensions. I installed from source and it worked. - tornillo

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.