1
在這段代碼解析錯誤在
neighbours :: CityMap -> District -> [District]
neighbours (CM (_,rs)) b = mapMaybe neighbour rs
where neighbour (p,q)
| b == p = Just q --parse error (possibly incorrect indentation or mismatched brackets)
| b == q = Just p
| otherwise = Nothing
我在第一解析«|»
檢查您的縮進。一個標籤是8個空格。 – chirlu
@chirlu,我使用4個空格。 – row248
我認爲你的警衛需要經過鄰居的開始 – DiegoNolan