Open isovector opened 4 years ago
note to self:
== Laws == quickspec_laws :: [(String, Property)] quickspec_laws = [ ( "cat x failMatch = failMatch" , property $ \ (x :: Regex Bool3) -> cat x failMatch =~= failMatch) , ( "cat failMatch x = failMatch" , property $ \ (x :: Regex Bool3) -> cat failMatch x =~= failMatch) , ( "cat (cat x y) z = cat x (cat y z)" , property $ \ (x :: Regex Bool3) (y :: Regex Bool3) (z :: Regex Bool3) -> cat (cat x y) z =~= cat x (cat y z)) ] == Functions == (/=) :: Char -> Char -> Bool both :: Regex Bool3 -> Regex Bool3 -> Regex Bool3 == Laws == quickspec_laws :: [(String, Property)] quickspec_laws = , ( "x /= y = y /= x" -- <-- uh oh! there is no opening [ here , property $
I'm not entirely sure what should happen here. Perhaps the == blocks should be emitted as comments in quickspec mode, and the quickspec_laws preamble should only be generated once.
==
quickspec_laws
note to self: