Thank-you!

By on 7/26/2009 9:31 AM ()

Hm, my copy of the book doesn't have that exact text...

Here's a shortened version that works for me; the issue you're seeing appears to be about internal versus public, can you post a standalone compiling snippet about the size of mine to help diagnose?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
 

type Prop = Prop of int
and internal PropRepr =
    | NotRepr of Prop
    | TrueRepr

type internal PropTable() =
    member t.ToUnique(repr:PropRepr) = Prop(0) // dummy impl
    member t.FromUnique(Prop(stamp)) = TrueRepr // dummy impl
let internal table = new PropTable()    

let (|Not|True|) prop =
    match table.FromUnique(prop) with
    | NotRepr(x) -> Not(x)
    | TrueRepr -> True

By on 7/24/2009 2:44 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper