I use Notepad ++ and WinGHCi to do the homework, and I need to define a small "database". The format is arbitrary, and I donβt think where I am mistaken. Anyway, here is what I use in the * .hs file:
let studentDB = [ ("sally", ["cpsc110", "cpsc312", "cpsc204"]), ("jim", ["cpsc110", "cpsc313"]), ("bob", ["cpsc121", "cpsc303", "cpsc212"]), ("frank", ["cpsc110", "cpsc212", "cpsc204"]), ("billy", ["cpsc312", "cpsc236"]), ("jane", ["cpsc121"]), ("larry", ["cpsc411", "cpsc236"]) ]
WinGHCi gives me this error: a1.hs: 118: 1: parsing error (possibly indented incorrectly)
I tried messing with the tuple tabs or placing my brackets on different lines, but couldn't get anything to work. I thought something less would help me track the error, so I did this instead:
let s = []
But that gave me the same error. Is this an indented error, possibly due to some fancy Notepad ++ behavior? Or is my Haskell wrong? Thanks.
user966249
source share