Last active
July 2, 2016 10:38
-
-
Save gotcha/3c0904f722dc98c1cef4e33940fe087e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 alias FieldId = String | |
| type alias Url = String | |
| type alias Flags = | |
| (FieldId, Url) | |
| init : FieldId -> Url -> String | |
| init fieldid url = | |
| if isvalidUrl fieldid then | |
| "Not Empty" | |
| else | |
| "Empty" | |
| isvalidUrl : Url -> Bool | |
| isvalidUrl url = | |
| if url == "" then | |
| False | |
| else | |
| True |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code above is valid.
The
initfunction above the first parameter is of typeFieldId.isValidUrlawaits a value of typeUrl.However, the code does compile.
Is there a way to make it complain ?