Missing Data.Binary

63 views
Skip to first unread message

Hannes Sörensson

unread,
May 17, 2011, 6:56:04 AM5/17/11
to Grammatical Framework
Hi,

I am trying to run the Haskell translator example from the tutorial.
When I try to compile, I get the following:

PGF.hs:153:7:
Could not find module `Data.Binary':
It is a member of the hidden package `ghc-binary-0.5.0.2'.
Use -v to see a list of the files searched for.

I have tried this with several different versions of GHC (among them
6.12.3 and (the latest) 7.0.3). I am at a loss for how to fix this.
Any help is appreciated!

/ Hannes

Krasimir Angelov

unread,
May 17, 2011, 7:47:48 AM5/17/11
to gf-...@googlegroups.com
I guess that you are trying to compile the PGF interpreter manually.
Although it is possible to do it by adding some extra options, this is
not the way to go. If you have installed GF properly then you just
have to pass the option --make to GHC and this is enough for GHC to
find the already compiled and installed modules. Try something like
this:

ghc --make MyApp.hs

where MyApp.hs is your custom application that uses GF.

Regards,
Krasimir


2011/5/17 Hannes Sörensson <darth...@gmail.com>:

Hannes Sörensson

unread,
May 17, 2011, 8:53:48 AM5/17/11
to Grammatical Framework
Actually, I did exactly that. Still I get the error message. I guess
this is not a known problem then? Should I maybe look elsewhere for
expertise on handling Haskell packages?

/ Hannes

On May 17, 1:47 pm, Krasimir Angelov <kr.ange...@gmail.com> wrote:
> I guess that you are trying to compile the PGF interpreter manually.
> Although it is possible to do it by adding some extra options, this is
> not the way to go. If you have installed GF properly then you just
> have to pass the option --make to GHC and this is enough for GHC to
> find the already compiled and installed modules. Try something like
> this:
>
> ghc --make MyApp.hs
>
> where MyApp.hs is your custom application that uses GF.
>
> Regards,
>   Krasimir
>
> 2011/5/17 Hannes Sörensson <darth.sm...@gmail.com>:

Krasimir Angelov

unread,
May 17, 2011, 9:08:17 AM5/17/11
to gf-...@googlegroups.com
Then I guess that your toplevel module, i.e. MyApp.hs in my example,
was in the same directory as PGF.hs. Move it somewhere outside of the
GF sources.


2011/5/17 Hannes Sörensson <darth...@gmail.com>:

Hannes Sörensson

unread,
May 17, 2011, 11:00:00 AM5/17/11
to Grammatical Framework
I looked into it some more. Turned out I had copied PGF.hs to my
directory, in order to get around a first error where ghc was looking
for it. Is there something wrong with my installation or should I do
something to make sure that my ghc installation finds the Haskell
files in the gf directory?

On 17 Maj, 15:08, Krasimir Angelov <kr.ange...@gmail.com> wrote:
> Then I guess that your toplevel module, i.e. MyApp.hs in my example,
> was in the same directory as PGF.hs. Move it somewhere outside of the
> GF sources.
>
> 2011/5/17 Hannes Sörensson <darth.sm...@gmail.com>:

Krasimir Angelov

unread,
May 17, 2011, 11:25:57 AM5/17/11
to gf-...@googlegroups.com
I didn't understand did is work after you removed PGF.hs from your
working directory or not?


2011/5/17 Hannes Sörensson <darth...@gmail.com>:

Hannes Sörensson

unread,
May 17, 2011, 11:28:01 AM5/17/11
to Grammatical Framework
It did not work, which was the reason I had copied the file in the
first place. I just get "Could not find module 'PGF'".

On 17 Maj, 17:25, Krasimir Angelov <kr.ange...@gmail.com> wrote:
> I didn't understand did is work after you removed PGF.hs from your
> working directory or not?
>
> 2011/5/17 Hannes Sörensson <darth.sm...@gmail.com>:

Krasimir Angelov

unread,
May 17, 2011, 11:52:41 AM5/17/11
to gf-...@googlegroups.com
Then probably you didn't install GF properly. You can see the list of
installed GHC packages by running the command:

ghc-pkg list

2011/5/17 Hannes Sörensson <darth...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages