相关疑难解决方法(0)

COMPLETE pragma doesn't prevent incomplete-patterns warning

I made two pattern views for a list-like class.

infixr 5 :<
pattern (:<) :: Stream s => Token s -> s -> s
pattern b :< bs <- (uncons -> Just (b, bs))
  where b :< bs = cons b bs

pattern Nil :: Stream s => s
pattern Nil <- (uncons -> Nothing)
  where Nil = empty
Run Code Online (Sandbox Code Playgroud)

uncons signature: uncons :: (Stream s) => s -> Maybe (Token s, s).

Suppose I also have function that uses …

haskell ghc

5
推荐指数
0
解决办法
52
查看次数

标签 统计

ghc ×1

haskell ×1