Posts for #F#

I just spent a little while hunting down an interesting problem in a little F# app. I had a bunch of code in a single file and I was going to structure it a bit and move certain parts into separate files. I started out from some code like this:

namespace Sturm.MyNamespace

type ICommandLine = begin
  abstract member Parts: string list
end

type IPlugin =
  abstract member CanHandle: ICommandLine -> bool
  abstract member Handle: ICommandLine -> unit

type blah =
  val mutable dummy: int
  interface IPlugin with
    member x.CanHandle(commandLine) = false
    member x.Handle(commandLine) = x.dummy <- 1
  end
  new() = { dummy = 0 }