Last active
September 30, 2016 09:08
-
-
Save deepak/392dad0dd1f788471fae6eef16ac55a1 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
-- trying in elm-repl | |
import Random | |
type Msg = Foo Bool | |
r = (Random.generate Foo Random.bool) | |
-- { type = "leaf", home = "Random", value = Generate (Generator <function>) } | |
-- : Platform.Cmd.Cmd Repl.Msg | |
-- how to get the random value ? | |
r.value -- error | |
-- TYPE MISMATCH --------------------------------------------- repl-temp-000.elm | |
-- `r` is being used in an unexpected way. | |
-- 5| r.value | |
-- ^ | |
-- Based on its definition, `r` has this type: | |
-- Cmd Msg | |
-- But you are trying to use it as: | |
-- { b | value : a } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment