jdreaver / eventful

Event Sourcing library for Haskell
MIT License
106 stars 22 forks source link

Not in scope: type constructor or class ‘VersionedEventStoreWriter’ #25

Closed revskill10 closed 6 years ago

revskill10 commented 6 years ago

I installed eventful with stack install eventful-core and eventful-memory. When running example counter-cli, there're errors:

Not in scope: type constructor or class ‘VersionedEventStoreWriter’
    Perhaps you meant ‘VersionedEventStoreReader’ (imported from Eventful.Store.Class)
   |
20 |     readAndHandleCommand :: VersionedEventStoreWriter STM CounterEvent -> VersionedEventStoreReader STM CounterEvent -> IO ()
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^

test.hs:92:34: error:
    Not in scope: type constructor or class ‘CommandHandler’
   |
92 |     type CounterCommandHandler = CommandHandler CounterState CounterEvent CounterCommand

How to fix it ?

jdreaver commented 6 years ago

Are you installing from Hackage, but then building the examples from this git repo? The version on Hackage will be behind what is in this repo. If you are building the examples, you should be running stack build from within the root directory of this repo.

revskill10 commented 6 years ago

@jdreaver Yes, i installed from Hackage. In this case do you know how to update package with stack right from github ?

jdreaver commented 6 years ago

https://docs.haskellstack.org/en/stable/yaml_configuration/#git-and-mercurial-repos