开发者

Usage of ! in a Haskell type [duplicate]

开发者 https://www.devze.com 2022-12-27 06:40 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: What does the exclamation开发者_高级运维 mark mean in a Haskell declaration?
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

精彩评论

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