I need to debug some haskell code and figure out where an issue is occuring at runtime. When I run my program is says this
main: Prelude.(!!): index too large
which leads me to believe that there is a place I'm sending a list to a function that I really shouldn't be, and I don't know where. This is a 600+ line semantic analysis program. Trouble is, I can't for the life of me figure out where this !! error is. The debugging documentation is really confusing, and I can't get GHCI to cooperate so I can maybe figure this out. Whenever I run ghci main.hs, this happens:
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Ok, modules loaded: Main.
Prelude Main>
I cannot seem to get it to turn to
*Main>
so that I can actually set breakpoints and all that fun stuff. How do I get this to work?