-
-
Save sgrove/76c9c674be8b6ec2ec353e7ed2e74921 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 authToken = | |
| OAuth string | |
| ApiKey string | |
[@@deriving yojson]; | |
type auth = | |
| Google authToken | |
| Github authToken | |
[@@deriving yojson]; |
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
/* Error: Unbound constructor Google */ | |
List.find | |
( | |
fun | |
| Google (OAuth token) => true | |
| Google (ApiKey token) => true | |
| Github (OAuth token) => false | |
| Github (ApiKey token) => false | |
) | |
parsedSession.auths; | |
/* Error: Unbound type constructor Auth.auth */ | |
List.find | |
( | |
fun | |
| Google (OAuth token) => true | |
| Google (ApiKey token) => true | |
| Github (OAuth token) => false | |
| Github (ApiKey token) => false: | |
Auth.auth => bool | |
) | |
parsedSession.auths; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment