Skip to content

Instantly share code, notes, and snippets.

@saschatimme
Created August 17, 2017 09:02
Show Gist options
  • Save saschatimme/339836556ba68559747346b39b926d03 to your computer and use it in GitHub Desktop.
Save saschatimme/339836556ba68559747346b39b926d03 to your computer and use it in GitHub Desktop.
You can extract `MyFunctorReturnType` in a separate module to avoid the repetition
module type MyFunctorReturnType = {let myFunc: unit => string;};
module MyFunctor (Impl: {type myType;}) => {
let myFunc () => "hello";
};
module MyExample =
MyFunctor {
type myType = string;
};
module type MyFunctorReturnType = {let myFunc: unit => string;};
module MyFunctor: (Impl: {type myType;}) => MyFunctorReturnType;
module MyExample: MyFunctorReturnType;
@saschatimme
Copy link
Author

You can extract MyFunctorReturnType in a separate module to avoid the repetition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment