polymorphic-variants Questions

2

Solved

I'm new to F# so forgive me in advance if this is a stupid question or if the syntax may be a bit off. Hopefully it's possible to understand the gist of the question anyways. What I'd like to achi...
Duster asked 8/3, 2020 at 10:42

1

Solved

Suppose I have a type consisting of multiple polymorphic variants (covariantly) such as the following: [> `Ok of int | `Error of string] Let's further suppose that I want to factor this defin...

1

Solved

I have the following code: module Test : sig type +'a t val make : int -> [< `a | `b] t end = struct type 'a t = Foo of int | Bar of string let make = function | 0 -> (Foo 0 : [`a] ...
Flick asked 13/1, 2018 at 6:23

2

Solved

Given these types type a = [ `A ] type b = [ a | `B | `C ] and this function let pp: [< b] -> string = function | `A -> "A" | `B -> "B" | `C -> "C" applying a value of type ...
Belgian asked 9/11, 2017 at 21:45
1

© 2022 - 2025 — McMap. All rights reserved.