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