
3 Jul
2005
3 Jul
'05
4:08 a.m.
Hi, I try to understand, how Parsec works. In Pos.hs I found these definition of SourcePos: data SourcePos = SourcePos SourceName !Line !Column deriving (Eq,Ord) My poor haskell knowledge says me, that Line and Column is always strict. So, what does the following function? forcePos :: SourcePos -> SourcePos forcePos pos@(SourcePos name line column) = seq line (seq column (pos)) thanks for an enlightenment, Christoph Bauer -- let () = let rec f a w i j = Printf.printf "%.20f\r" a; let a1 = a *. i /. j in if w then f a1 false (i +. 2.0) j else f a1 true i (j +. 2.0) in f 2.0 false 2.0 1.0