Advertisement
Guest User

Untitled

a guest
Aug 14th, 2022
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1.  
  2. newShot :: (MonadState Game m) => m ()
  3. newShot = do
  4. game <- get
  5. ccraft <- gets (_getCraft . _craft)
  6. cshots <- gets (_getShots . _shots)
  7. let nshot = moveSh [ccraft]
  8. shots .= Shots (nshot: cshots)
  9.  
  10. =============================================================================================
  11.  
  12. app/Main.hs:116:26: error:
  13. • Couldn't match type ‘(Int, Int)’ with ‘[Point]’
  14. Expected type: [[Point]]
  15. Actual type: [Point]
  16. • In the second argument of ‘(:)’, namely ‘cshots’
  17. In the first argument of ‘Shots’, namely ‘(nshot : cshots)’
  18. In the second argument of ‘(.=)’, namely ‘Shots (nshot : cshots)’
  19. |
  20. 116 | shots .= Shots (nshot: cshots)
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement