Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/absil/illib.fs
Original file line number Diff line number Diff line change
Expand Up @@ -448,16 +448,16 @@ module List =

[<Struct>]
type ValueOption<'T> =
| VSome of 'T
| VNone
member x.IsSome = match x with VSome _ -> true | VNone -> false
member x.IsNone = match x with VSome _ -> false | VNone -> true
member x.Value = match x with VSome r -> r | VNone -> failwith "ValueOption.Value: value is None"
| ValueSome of 'T
| ValueNone
member x.IsSome = match x with ValueSome _ -> true | ValueNone -> false
member x.IsNone = match x with ValueSome _ -> false | ValueNone -> true
member x.Value = match x with ValueSome r -> r | ValueNone -> failwith "ValueOption.Value: value is None"

[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module ValueOption =
let inline ofOption x = match x with Some x -> VSome x | None -> VNone
let inline bind f x = match x with VSome x -> f x | VNone -> VNone
let inline ofOption x = match x with Some x -> ValueSome x | None -> ValueNone
let inline bind f x = match x with ValueSome x -> f x | ValueNone -> ValueNone

module String =
let indexNotFound() = raise (new KeyNotFoundException("An index for the character was not found in the string"))
Expand Down
4 changes: 2 additions & 2 deletions src/fsharp/AttributeChecking.fs
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,15 @@ let IsSecurityAttribute (g: TcGlobals) amap (casmap : Dictionary<Stamp, bool>) (
| None -> false
| Some attr ->
match attr.TyconRef.TryDeref with
| VSome _ ->
| ValueSome _ ->
let tcs = tcref.Stamp
match casmap.TryGetValue(tcs) with
| true, c -> c
| _ ->
let exists = ExistsInEntireHierarchyOfType (fun t -> typeEquiv g t (mkAppTy attr.TyconRef [])) g amap m AllowMultiIntfInstantiations.Yes (mkAppTy tcref [])
casmap.[tcs] <- exists
exists
| VNone -> false
| ValueNone -> false

let IsSecurityCriticalAttribute g (Attrib(tcref, _, _, _, _, _, _)) =
(tyconRefEq g tcref g.attrib_SecurityCriticalAttribute.TyconRef || tyconRefEq g tcref g.attrib_SecuritySafeCriticalAttribute.TyconRef)
Expand Down
Loading