
15 Sep
2014
15 Sep
'14
9:38 a.m.
On Sep 15, 2014, at 9:14 AM, Arnaud Bailly
Hello, I have a somewhat similar problem, trying to achieve union types but for the purpose of defining the set of allowable outcomes of a function. I have tried naively to define a type operator a :| b and I would like to be able to define a function like :
f :: Int -> Int :| String :| Bool f 1 = in 1 1 f 2 = in 2 "foo" f 3 = in 3 True
How is this different from `Either Int (Either String Bool)`? Richard