Open wchresta opened 6 years ago
The problem seems to be, that there is a local bind to lcd
when the function is also called lcd
. Renaming the function to lcdProgram
gets rid of the ghc panic.
lcdProgram :: Arduino ()
lcdProgram = do
lcd <- lcdRegister lcdController
let display :: B.ByteString -> Arduino ()
display s = lcdWrite lcd (B.unpack s :: [Word8])
loop $ do
lcdClear lcd
lcdHome lcd
Also, using the fixed code, I get the following (with either active or deactivated ShallowDeepPlugin):
stack exec lcdProgram
lcdProgram: compileCommand - Unknown command, it may actually be a procedure
CallStack (from HasCallStack):
error, called at ./System/Hardware/Haskino/Compiler.hs:401:20 in haskino-0.6-48Ib5C2ddqUKvTQPcysKID:System.Hardware.Haskino.Compiler
Using the ShallowDeepPlugin leads to a ghc panic:
https://ghc.haskell.org/trac/ghc/ticket/15280#comment:1