haskell / mwc-random

A very fast Haskell library for generating high quality pseudo-random numbers.
http://hackage.haskell.org/package/mwc-random
BSD 2-Clause "Simplified" License
55 stars 25 forks source link

No instance for (vector-0.11.0.0:Data.Vector.Generic.Base.Vector Vector Int) #60

Closed dilawar closed 4 years ago

dilawar commented 7 years ago

Following snippets fails.

import System.Random.MWC 
import Data.Vector.Unboxed

main :: IO ( )
main = do
    numbers <- withSystemRandom . asGenIO $ \gen -> uniformVector gen 20
    print ( numbers  :: Vector Int )
    putStrLn "All done"

Error is following.

  No instance for (vector-0.11.0.0:Data.Vector.Generic.Base.Vector
                       Vector Int)
      arising from a use of ‘uniformVector’
    In the expression: uniformVector gen 20
    In the second argument of ‘($)’, namely
      ‘\ gen -> uniformVector gen 20’
    In a stmt of a 'do' block:
      numbers <- withSystemRandom . asGenIO
                 $ \ gen -> uniformVector gen 20

GHCi, version 7.10.3.

Shimuuar commented 4 years ago

Works fine with mwc-random-0.14.0.0