-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I'm getting the following error in the Image example:
• Couldn't match type ‘IO’ with ‘Data.Functor.Identity.Identity’
arising from a functional dependency between:
constraint ‘ArrowSchedule
(S.SystemT Data.Functor.Identity.Identity)
(Aztecs.ECS.Schedule.ScheduleT (A.AccessT IO))’
arising from a use of ‘system’
instance ‘ArrowSchedule (S.SystemT m) (Schedule m)’
at <no location info>
• In the first argument of ‘(>>>)’, namely ‘system IMG.setup’
In the second argument of ‘(>>>)’, namely
‘system IMG.setup
>>>
system setup
>>>
forever_
(IMG.load >>> SDL.update >>> system IMG.draw >>> SDL.draw)’
In the expression:
SDL.setup
>>>
system IMG.setup
>>>
system setup
>>>
forever_ (IMG.load >>> SDL.update >>> system IMG.draw >>> SDL.draw)I was getting this in the Window example, but was able to fix it by changing the type of setup to setup :: S.SystemT IO () ().
However, in the Image example it's using the IMG.setup system which comes from Aztecs.SDL.Image so I cannot change that. Seems I need to be able to map SystemT Identity () () to SystemT IO () () somehow, but doesn't seem to be some kind of lift function?
I'm unfamiliar with arrows, and relatively new to monad transformers, so I might be missing something obvious?
Metadata
Metadata
Assignees
Labels
No labels