Created
February 27, 2020 14:56
-
-
Save richyk1/490e05dabb325fb8f60a82bef842901c to your computer and use it in GitHub Desktop.
Revisions
-
richyk1 created this gist
Feb 27, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ personExists :: Person -> Bool personExists (Person id name lastname password) = do let database = "database.txt" contents <- readFile database if (contents > 0) then do let (x:xs) = splitOn "\n" contents person = id ++ ";" ++ name ++ ";" ++ lastname ++ ";" ++ password existsInList person [] = False existsInList person (x:xs) | person == x = True | otherwise = existsInList person xs -- issue is on this "in" ; Storage.hs:36:9: error: parse error on input `in' in existsInList person (x:xs) else False