Skip to content

Compiled hint not working under Raspberry Pi #64

@yaxu

Description

@yaxu

I'm trying to get hint going with an experimental live coding editor for music (https://github.com/yaxu/feedforward), running on a raspberry pi zero computer (running raspbian stretch, with ghc 8.0.1, on an armv6 processor).

It works, but only from runhaskell/ghci, and not when compiled. Here's what happens when I try to run the example:

pi@lcd:~/src/hint/examples $ ./example 
Load SomeModule.hs

Put the Prelude, Data.Map and *SomeModule in scope
Data.Map is qualified as M!

Now we can query the type of an expression
e.g. typeOf M.singleton (f, g, h, 42)
Num t => a -> M.Map ([a1] -> a1, [a2] -> a2, [a3] -> a3, t) a

Observe that f, g and h are defined in SomeModule.hs, but f is not exported. Let's check it...
[Fun "g",Fun "h"]

We can also evaluate an expression; the result will be a string
e.g. eval "length $ concat [[f,g],[h]]"
Illegal instruction

As I say, it's fine when run with runhaskell or from a ghci prompt. I have the same with my hint-driven text editor - it's fine (but of course slow) from runhaskell, but I get an Illegal instruction error when interpreting something with hint, via a binary compiled with ghc.

I don't know much about this stuff, but think the problem is probably with the armv6 port of ghc. My efforts in trying to compile a newer ghc for raspbian have not been successful though..

So I thought I'd ask here - any possibility that the problem could be with hint in particular rather than ghc in general? Any pointers much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions