Created
April 28, 2019 21:48
-
-
Save dionyziz/623dbeb6cc28126d4908d3449a9d0e3f 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
23.hs:23:3: error: | |
• Couldn't match type ‘a’ with ‘a0’ | |
‘a’ is a rigid type variable bound by | |
the type signature for: | |
rnd_select :: forall a. [a] -> Int -> IO [a] | |
at 23.hs:18:1-34 | |
Expected type: IO [a] | |
Actual type: IO [a0] | |
• In a stmt of a 'do' block: return choice | |
In the expression: | |
do gen <- getStdGen | |
let (gen', choice) = (chooseN gen n xs) | |
setStdGen gen' | |
return choice | |
In an equation for ‘rnd_select’: | |
rnd_select xs n | |
= do gen <- getStdGen | |
let (gen', choice) = ... | |
setStdGen gen' | |
.... | |
• Relevant bindings include | |
choice :: [a0] (bound at 23.hs:21:14) | |
xs :: [a] (bound at 23.hs:19:12) | |
rnd_select :: [a] -> Int -> IO [a] (bound at 23.hs:19:1) | |
| | |
23 | return choice | |
| ^^^^^^^^^^^^^ | |
Failed, one module loaded. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment