>>> runLazy_ $ \p -> p != "good" "good"
>>> runLazy_ $ \p -> do q <- promise_; p != "yay! " ++ demand q; q != "it works." "yay! it works."
>>> runLazy_ $ \p -> return () *** Exception: BrokenPromise
>>> runLazy (\p -> return ()) "default" "default"
selectSimon :: MonadIO m => ReaderT SqlBackend m [Entity User] selectSimon = selectList [UserName !=. "SPJ" ] []The above query when applied on dataset-1, will produce this:
+-----+-----+-----+ |id |name |age | +-----+-----+-----+ |2 |Simon|41 | +-----+-----+-----+
> 1 `div` 1 !==! 2 `div` 2 True
> 1 `div` 1 !==! 1 `div` 2 False
> 1 `div` 1 !==! 1 `div` 0 False
> 6 `mod` 0 !==! 2 `div` 0 True
> head [] !==! tail [] False
> error "a" !==! error "a" True
> error "a" !==! error "b" FalseOn error, this function returns the result of comparing the first line of error values.
v1 <- o .:? "opt_field_with_dfl" .!= "default_val" v2 <- o .: "mandatory_field" v3 <- o .:? "opt_field2"