-
-
Save andreas/53f67474cbc69e8b995229042c07b956 to your computer and use it in GitHub Desktop.
This file contains 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
type (_, _) typ = | |
(* ... other definitions *) | |
| DynTyp : 'ctx dyn -> ('ctx, 'ctx dyn) typ | |
and 'ctx dyn = | |
Dyn : ('ctx, 'src) typ * 'src -> 'ctx dyn | |
let rec typ_to_string : type src. ('ctx, src) typ -> 'ctx -> src -> string = | |
fun typ ctx src -> | |
match typ with | |
(* ... other match cases *) | |
| DynTyp (Dyn (typ', src')) -> typ_to_string typ' ctx src' | |
Error: This pattern matches values of type ($'ctx, $'ctx dyn) typ | |
The type constructor $'ctx would escape its scope |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment