Skip to content

Instantly share code, notes, and snippets.

@lordcirth
Created April 6, 2017 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lordcirth/5af5c34ce22a215a70bc2eac41f74de5 to your computer and use it in GitHub Desktop.
Save lordcirth/5af5c34ce22a215a70bc2eac41f74de5 to your computer and use it in GitHub Desktop.
No instance for (Functor f0) arising from a use of ‘creatures’
The type variable ‘f0’ is ambiguous
Relevant bindings include
player :: (Creature -> f0 Creature) -> GameState -> f0 GameState
(bound at src/GameState.hs:75:1)
Note: there are several potential instances:
instance Functor (Const m) -- Defined in ‘Control.Applicative’
instance Control.Arrow.Arrow a =>
Functor (Control.Applicative.WrappedArrow a b)
-- Defined in ‘Control.Applicative’
instance Monad m => Functor (Control.Applicative.WrappedMonad m)
-- Defined in ‘Control.Applicative’
...plus 42 others
In the first argument of ‘(.)’, namely ‘creatures’
In the expression: creatures . ix 0
In an equation for ‘player’: player = creatures . ix 0
No instance for (Applicative f0) arising from a use of ‘ix’
The type variable ‘f0’ is ambiguous
Relevant bindings include
player :: (Creature -> f0 Creature) -> GameState -> f0 GameState
(bound at src/GameState.hs:75:1)
Note: there are several potential instances:
instance Monoid m => Applicative (Const m)
-- Defined in ‘Control.Applicative’
instance Control.Arrow.Arrow a =>
Applicative (Control.Applicative.WrappedArrow a b)
-- Defined in ‘Control.Applicative’
instance Monad m =>
Applicative (Control.Applicative.WrappedMonad m)
-- Defined in ‘Control.Applicative’
...plus 29 others
In the second argument of ‘(.)’, namely ‘ix 0’
In the expression: creatures . ix 0
In an equation for ‘player’: player = creatures . ix 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment