Skip to content

Attempted to follow the "Getting Started" instructions, couldn't successfully import MCPrelude. #81

Description

@derifatives

I followed the "Getting Started" instructions at https://mightybyte.github.io/monad-challenges/. The cabal install ran for a long time (maybe 20 minutes? I wandered off) but seemed to complete successfully. However, trying to ghci a simple toy file failed to import the prelude:

rif@rifo1:~/tmp/mc/monad-challenges/monad-challenges-code$ cat Set1.hs
{-# LANGUAGE MonadComprehensions #-}
{-# LANGUAGE RebindableSyntax  #-}

module Set1 where

import MCPrelude

fiveRands:: [Integer]
fiveRands = [3, 4, 5]

rif@rifo1:~/tmp/mc/monad-challenges/monad-challenges-code$ ghci Set1.hs
GHCi, version 8.8.4: https://www.haskell.org/ghc/  :? for help
[1 of 1] Compiling Set1             ( Set1.hs, interpreted )

Set1.hs:6:1: error:
    Could not find module ‘MCPrelude’
    Perhaps you meant Prelude (from base-4.13.0.0)
    Use -v (or `:set -v` in ghci) to see a list of the files searched for.
  |
6 | import MCPrelude
  | ^^^^^^^^^^^^^^^^
Failed, no modules loaded.
Prelude> 

Is there maybe some missing piece of newbie instructions here? Do I have to somehow add MCPrelude to a path or something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions