Latest change Dec 19, 2022

Frequently Asked Questions (FAQ) for DVA229 Functional Programming with F#

This FAQ exemplifies some common problems, and indicates how they can be solved. It is expected to grow with time.

Question: what is needed to get FSharpx to work under different versions of Visual Studio?

Answer:

VS2010: this platform runs F# 2.0, so FSharpx is (most likely) not available there.

VS2012: We have not been able to try it, but we believe that it should work in the same way as for VS2013 or VS2015.

VS2013: Observable can be used provided the following steps are taken:

  1. change "FSharp" to "FSharpx" when opening the module in Program.fs. (This seems to be simply a typo in the code. From 2017-02-27 we have corrected it, so you need to change only if you have an older version.)
  2. For the code skeleton it is enough to have a reference to FSharpx.Async, which can be installed through NuGet Console → "Install-package FSharpx.Extras".

VS2015: Step 1 is as above, but for Step 2 a direct installation of FSharpx.Extras will fail. Instead you will have to install FSharpx.Async and FSharpx.Collections first. So installing in this order should work:

  1. Install-package FSharpx.Async
  2. Install-package FSharpx.Collections
  3. Install-package FSharpx.Extras
As a matter of fact you should only need FSharpx.Async for the Lab 4 code skeleton.

Alternatively, the dll file for FSharpx.Async can be built manually. The sources are included in the FSharpx.Extras repository on github. We haven't succeded to build FSharpx.Extras in VS, but it worked when using some of the provided script files from github (like build.sh eller build.cmd). When the build script has been run, then (at least under Windows) then the dll file will be found under ~\packages\FSharpx.Async\lib\net40 where "~" is the search path to the folder where the build files are located.

We have no information how to use FSharpx on other platforms, such as Mono. (If you have any experience of this, then do let us know!)

Question: Is it OK to use Windows Presentation Foundation for Lab 4?

Answer: Yes, this is OK. Windows Presentation Foundation is mainly a tool to create nice GUI's: the reactive programming, which is the important part of the lab, will remain as before. However note that the reactive programming still must be "functional style", which means not relying too much on state and side-effects.


Björn Lisper
bjorn.lisper (at) mdu.se