Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. preprocess myarray
  2.     | tunings > 15 = fixarray myarray
  3.     | otherwise = myarray
  4.     where   tunings = read $ myarray ! 26
  5.         fixarray passedarray = passedarray // [(7, show fixedspeed),(8, show fixedaccel),(26, "15")]
  6.         fixedspeed = floor $ originalspeed * ( 1 + (tunings - 15) * 0.1)
  7.         fixedaccel =  floor $ originalaccel * ( 1 + originalspeed / (fixedspeed - originalspeed))
  8.         originalspeed = read $ myarray ! 7
  9.         originalaccel = read $ myarray ! 8
  10.  
  11. [1 of 1] Compiling Main             ( new  2.hs, new  2.o )
  12.  
  13. new  2.hs:49:15:
  14.     Ambiguous type variable `a' in the constraints:
  15.      `Integral a' arising from a use of `floor' at new  2.hs:49:15-19
  16.      `RealFrac a' arising from a use of `floor' at new  2.hs:50:16-20
  17.      `Read a' arising from a use of `read' at new  2.hs:47:17-20
  18.    Probable fix: add a type signature that fixes these type variable(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement