Created
August 17, 2017 09:02
-
-
Save saschatimme/339836556ba68559747346b39b926d03 to your computer and use it in GitHub Desktop.
You can extract `MyFunctorReturnType` in a separate module to avoid the repetition
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
module type MyFunctorReturnType = {let myFunc: unit => string;}; | |
module MyFunctor (Impl: {type myType;}) => { | |
let myFunc () => "hello"; | |
}; | |
module MyExample = | |
MyFunctor { | |
type myType = string; | |
}; |
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
module type MyFunctorReturnType = {let myFunc: unit => string;}; | |
module MyFunctor: (Impl: {type myType;}) => MyFunctorReturnType; | |
module MyExample: MyFunctorReturnType; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can extract
MyFunctorReturnType
in a separate module to avoid the repetition