[Haskell-cafe] Re: Atom bug(?)
Lee Pike
leepike at gmail.com
Tue Jan 19 17:50:45 EST 2010
Tom,
Ah, right.
> The top-most rule is implied with the compile command. This makes it
> appear as if the assignment doesn't belong to a rule, when if fact it
> belongs to the implicit top level rule. The top level rule always has
> a period of 1.
>
> Period constraints are only applied to sub-rules, not the current
> rule.
So to get the behavior I was expecting, I can name everything
explicitly. Then the assignment will inherit the period:
> example :: Atom ()
> -- example = period 3 $ do
> example = period 3 $ atom "ex" $ do
>
> a <- word32 "a" 0
>
> a <== 21
Lee
More information about the Haskell-Cafe
mailing list