相关疑难解决方法(0)

奇怪的ghc错误信息,"我的大脑爆炸了"?

当我尝试使用proc语法(使用Netwire和Vinyl)对GADT 进行模式匹配时:

sceneRoot = proc inputs -> do
            let (Identity camera :& Identity children) = inputs 
            returnA -< (<*>) (map (rGet draw) children) . pure
Run Code Online (Sandbox Code Playgroud)

我从ghc-7.6.3得到(相当奇怪的)编译器错误

  My brain just exploded
    I can't handle pattern bindings for existential or GADT data constructors.
    Instead, use a case-expression, or do-notation, to unpack the constructor.
    In the pattern: Identity cam :& Identity childs

当我将模式放在模式中时,我得到了类似的错误proc (...).为什么是这样?它不健全,还是只是未实现?

haskell arrows gadt

20
推荐指数
1
解决办法
1385
查看次数

标签 统计

arrows ×1

gadt ×1

haskell ×1