Skip to content

Instantly share code, notes, and snippets.

@lordcirth
Created April 6, 2017 01:32
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/a14d3f1974109c3ac2c60ba0a21fd3c3 to your computer and use it in GitHub Desktop.
Save lordcirth/a14d3f1974109c3ac2c60ba0a21fd3c3 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:76:1)
Note: there are several potential instances:
instance Functor Data.Complex.Complex
-- Defined in ‘base-orphans-0.5.4:Data.Orphans’
instance Functor Identity -- Defined in ‘Data.Functor.Identity’
instance Functor f => Functor (Data.Monoid.Alt f)
-- Defined in ‘Data.Monoid’
...plus 33 others
In the first argument of ‘(.)’, namely ‘creatures’
In the expression: creatures . _head
In an equation for ‘player’: player = creatures . _head
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment