您好,有什么方法可以解决Haskell中经常出现的缩进不正确的问题吗?我正在使用VSCode,很多时候我只需要添加一个额外的空间来编译模块即可。是否有任何方式(扩展名)可以向我展示如何管理制表符/空格...等?
module DB where
import Company
let db= [
Company{
compName="Siemens",
year=1912,
employees=[
Employee{age=25,name="Stew",job=Worker},
Employee{age=25,name="Michael",job=Manager,wage=66},
Employee{age=22,name="Stew",job=Worker,wage=33.0},
Employee{age=32,name="Dew",job=Unemployed,wage=0.5},
Employee{age=44,name="Drey",job=Worker,wage=30.0}]
},
Company{
compName="ABB",
year=1925,
employees=[
Employee{age=18,name="Michael",job=Manager,wage=21},
Employee{age=23,name="Rey",job=Worker,wage=18.5},
Employee{age=55,name="Barry",job=Unemployed,wage=0.7},
Employee{age=64,name="Dean",job=Worker,wage=30.0}]
},
Company{
compName="EATON",
year=1977,
employees=[
Employee{age=18,name="Raynald",job=Manager,wage=21},
Employee{age=23,name="Fitz",job=Worker,wage=18.5},
Employee{age=55,name="Alex",job=Worker,wage=0.7},
Employee{age=34,name="Bob",job=Worker,wage=23.0},
Employee{age=33,name="Odo",job=Unemployed,wage=24.0}]
}
]
答案 0 :(得分:1)
问题出在方法之外使用let
关键字。