如何解决使用 let 解析错误可能是不正确的缩进或不匹配的括号
我明白
分析错误(可能不正确压痕或不匹配的括号中)
在 import SiteFeature from '../common/SiteFeature';
import AboutPage from '../components/pages/AboutPage';
import ActualsPage from '../components/pages/ActualsPage';
import EventsPage from '../components/pages/EventsPage';
const getSiteFeatures = (): SiteFeature[] => {
const siteEmabledFeatures: SiteFeature[] = [];
const inactive: SiteFeature[] = [];
siteEmabledFeatures.push(
new SiteFeature('null1',ActualsPage,{
name: 'actual',displayName: 'Aktuális',path: '/actuals',icon: 'new_releases',isEnabled: true,isNavOpion: true,}),new SiteFeature('null2',AboutPage,{
name: 'about',displayName: 'Bemutatkozás',path: '/about',icon: 'info',new SiteFeature('null3',EventsPage,{
name: 'events',displayName: 'Események',path: '/events',icon: 'events',return siteEmabledFeatures;
};
export default getSiteFeatures;
行
| i > j = do swap axs p j
我真的很困惑这是什么原因,有人可以帮我澄清一下吗?
解决方法
这是一个缩进错误,你需要在 loop
的定义开始的右边至少放置一个保护符,所以:
apartition :: Ord a => STArray s Int a -> Int -> Int -> ST s Int
apartition axs p q = do
x <- readArray axs p
let loop i j
| i > j = do swap axs p j
return j
| otherwise = do u <- readArray axs i
if u < x
then do loop (i + 1) j
else do swap axs i j
loop i (j - 1)
loop (p + 1) q
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。