debug [d|
_seek_from :: (Integer, Integer) -> Integer -> [Integer] -> Maybe (Integer, Integer)
_seek_from (a, b) t [] = Nothing
_seek_from (a, b) t mem
| a > bound && b > bound = Nothing
| a < 0 || b < 0 = Nothing
| a > bound && b <= bound = _seek_from (0, b + 1) t mem
| otherwise =
let r = test_inputs (a, b) mem in
if r == t then Just (a, b) else _seek_from (a + 1, b) t mem
where bound = let x = toInteger . ((-) 1) . length $ mem in if x > 99 then 99 else x
|]
When I build (stack build) I get the following error:
Illegal variable name: ‘’Illegal variable name: ‘’
When splicing a TH declaration
It specifically has a problem on the debug [d| line.
I'm trying to use
debug
to instrument a function. I have followed the instructions, so the top of my source file looks like this:I'm instrumenting the function as follows:
When I build (
stack build
) I get the following error:It specifically has a problem on the
debug [d|
line.