mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-04 21:57:25 +03:00
23 lines
553 B
Plaintext
23 lines
553 B
Plaintext
|
|
use Foo Foo
|
|
use Optional Some None
|
|
|
|
type Foo a b = Foo a (Optional b)
|
|
|
|
foo : Foo a b -> (b -> c) -> Foo a c
|
|
foo x f = case x of
|
|
Foo a None -> Foo a None
|
|
|
|
--
|
|
-- 🌻 /Users/pchiusano/work/unison/unison-src/tests/typechecker-bug.u has changed, reloading...
|
|
-- I found a value of type b where I expected to find one of type c:
|
|
--
|
|
-- 7 | foo : Foo a b -> (b -> c) -> Foo a c
|
|
-- 8 | foo x f = case x of
|
|
-- 9 | Foo a None -> Foo a None
|
|
--
|
|
-- from right here:
|
|
--
|
|
-- 7 | foo : Foo a b -> (b -> c) -> Foo a c
|
|
-- shouldn't be a type error
|