Created
October 28, 2016 08:37
-
-
Save pietro909/27f7d05c2fd3a0818d011f343ce73475 to your computer and use it in GitHub Desktop.
Trying to reproduce runtime error conditions
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
import Html exposing (text, div) | |
import String | |
import List | |
contains c s = | |
-- we should use String.contains | |
(List.length (String.indexes c s)) > 0 | |
main = | |
div [] | |
[ text (toString (contains "hi" "there")) | |
, text (toString (contains "hi" "hi all")) | |
, text (toString (contains "hi" 1)) -- doesn't compile | |
, text (toString (contains "hi" Nothing)) -- doesn't compile | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment