Skip to content

Instantly share code, notes, and snippets.

@mynameislau
Created February 17, 2018 16:27
Show Gist options
  • Save mynameislau/80350f8e79eaf8634acff0cfed91fb27 to your computer and use it in GitHub Desktop.
Save mynameislau/80350f8e79eaf8634acff0cfed91fb27 to your computer and use it in GitHub Desktop.
Circular dependency ReasonML
type foo = {
bla: string
};
type bar = {
fooList: list(foo)
};
let theBar = {
fooList: [
/* error: This expression has type FileA.foo
but an expression was expected of type foo */
FileB.fooMaker("tfez")
]
};
open FileA;
let fooMaker = (str: string): foo => {
bla: str
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment