sdiehl / write-you-a-haskell

Building a modern functional compiler from first principles. (http://dev.stephendiehl.com/fun/)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem building the chapter 3

ricardopieper opened this issue · comments

Hello!

I'm improving my knowledge in Haskell as the tutorial goes.
I followed the chapter 3 and looked the source in the repo.
The Main.hs file has a call to a function called ppexpr, that is defined in Pretty.hs.
The Pretty.hs has this line of code:

import Type

When I try to build it, GHC give me this error:

Could not find module `Type'
It is a member of the hidden package `ghc-7.8.3'.

By the name, it seems like it is some module WE would create, not a GHC Type module, but anyway, in my .cabal file, I added the line ghc >= 7.8.3, and everything blew up:

Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package ghc-7.8.3 requires transformers-0.3.0.0
package mtl-2.2.1 requires transformers-0.4.2.0
package haskeline-0.7.1.3 requires transformers-0.4.2.0 
package Compiler-1.0.0.2 requires transformers-0.4.2.0

Seems like GHC wants a different version of the package. This is strange...

How could I solve this?

Great job anyway! If someday I complete the whole tutorial, if I have time, I could translate it to Portuguese ;)

Ok, I removed this line and got some compiler errors, because of bad identation.
Resolved this, and now it compiles.
My fault, sorry.