Created
October 1, 2020 01:12
-
-
Save witt3rd/68f45c90c904dd350a299bc99f94fc91 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| record Foo where | |
| constructor MkFoo | |
| from : Type | |
| to : Type | |
| bar : (a : Foo) -> (x : from a) -> (to a) | |
| -- impl not important | |
| baz : (a : Foo) -> (b : Foo) -> ((to b) = (from a)) => (x: from b) -> (to a) | |
| baz a b x = do | |
| let y = bar b x | |
| -- ?hole | |
| let z = bar a y | |
| z | |
| {- | |
| When checking argument x to Main.bar: | |
| Type mismatch between | |
| to b (Type of y) | |
| and | |
| from a (Expected type) | |
| -} | |
| {- | |
| a : Foo | |
| b : Foo | |
| x : from b | |
| constraint : to b = from a | |
| y : to b | |
| -------------------------------------- | |
| hole : to a | |
| -} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.