开发者

Usage of ! in a Haskell type [duplicate]

This question already has answers here: Closed 12 years ago.

Possible Duplicate:

What does the exclamation开发者_高级运维 mark mean in a Haskell declaration?

In Alex the generated boilerplate code includes

data AlexPosn = AlexPn !Int  -- absolute character offset
                       !Int  -- line number
                       !Int  -- column number

What does the ! in front of the Int indicate?


It´s a strictness flag as oposed to lazy evaluation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜