<div dir="ltr">The problem is that you are mixing tabs and spaces. It doesn't realize that the two lines are supposed to be at the same level of indentation. It's best to always use spaces, never tabs.<div><br></div>
<div>This might be easier to avoid if you put where on its own line, but the best solution is to configure your text editor to always expand tabs to spaces.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Apr 5, 2014 at 5:13 PM, S. H. Aegis <span dir="ltr"><<a href="mailto:shaegis@gmail.com" target="_blank">shaegis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hi.</div><div>I'm new to Haskell. I try to solve Euler Project for studying Haskell through Googling, reading books.</div><div>There is a error in where sentence, but I can't fix this.</div><div>

<br></div><div><div>maxEleList :: String -> String -> [Int]</div><div>maxEleList xs ys = maxOfTwo upperList lowerList</div><div><span style="white-space:pre-wrap">                                               </span>where <span style="white-space:pre-wrap">  </span>upperList = map turpleSum $ zip (toIntList xs) (toIntList ys)</div>

<div><span style="white-space:pre-wrap">                                                          </span>lowerList = map turpleSum $ zip (toIntList xs) (tail $ toIntList ys)</div></div><div><br></div><div>Error message is</div><div><div>~/maxPathSum.hs: line 4, column 75:</div>

<div>  Parse error</div><div>  Error message:</div><div>    Parse error: =</div><div>  Code:</div><div>      maxEleList xs ys = maxOfTwo upperList lowerList</div><div>      <span style="white-space:pre-wrap">                                           </span>where <span style="white-space:pre-wrap">  </span>upperList = map turpleSum $ zip (toIntList xs) (toIntList ys)</div>

<div>    > <span style="white-space:pre-wrap">                                                               </span>lowerList = map turpleSum $ zip (toIntList xs) (tail $ toIntList ys)</div></div><div><br></div><div><br></div><div>How can I fix this?</div><div>Thank you for your kind help.</div>

<div><br></div><div>S. Chang</div><div><br></div><div><br></div><div>----------------</div><div>This code is for Euler project: problem 18, and whole code is like this... (Not yet finished...)</div><div><br></div><div><div>

maxEleList :: String -> String -> [Int]</div><div>maxEleList xs ys = maxOfTwo upperList lowerList</div><div><span style="white-space:pre-wrap">                                           </span>where <span style="white-space:pre-wrap">  </span>upperList = map turpleSum $ zip (toIntList xs) (toIntList ys)</div>

<div><span style="white-space:pre-wrap">                                                          </span>lowerList = map turpleSum $ zip (toIntList xs) (tail $ toIntList ys)</div><div><span style="white-space:pre-wrap">     </span></div><div>maxOfTwo :: [Int] -> [Int] -> [Int]</div>

<div>maxOfTwo [] [] <span style="white-space:pre-wrap">                   </span>= []</div><div>maxOfTwo (x:xs) (y:ys) <span style="white-space:pre-wrap">      </span>= max x y : maxOfTwo xs ys</div><div><br></div><div>turpleSum :: (Int, Int) -> Int</div>

<div>turpleSum (x, y) = x + y</div><div><br></div><div>toIntList :: String -> [Int]</div><div>toIntList = map (\x -> read x :: Int) . words</div><div><br></div><div>rowData :: [[Int]]</div><div>--rowData = reverse $ map (map (\x -> read x :: Int) . words) [r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15]</div>

<div>rowData = map (map (\x -> read x :: Int) . words) [r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15]</div><div><br></div><div>r1 = "75"</div><div>r2 = "95 64"</div><div>r3 = "17 47 82"</div>

<div>r4 = "18 35 87 10"</div><div>r5 = "20 04 82 47 65"</div><div>r6 = "19 01 23 75 03 34"</div><div>r7 = "88 02 77 73 07 63 67"</div><div>r8 = "99 65 04 28 06 16 70 92"</div>

<div>r9 = "41 41 26 56 83 40 80 70 33"</div><div>r10 = "41 48 72 33 47 32 37 16 94 29"</div><div>r11 = "53 71 44 65 25 43 91 52 97 51 14"</div><div>r12 = "70 11 33 28 77 73 17 78 39 68 17 57"</div>

<div>r13 = "91 71 52 38 17 14 91 43 58 50 27 29 48"</div><div>r14 = "63 66 04 68 89 53 67 30 73 16 69 87 40 31"</div><div>r15 = "04 62 98 27 23 09 70 98 73 93 38 53 60 04 23"</div></div>
</div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>