Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {-# LANGUAGE InlineStatements #-}
- module Main where
- f :: Bool -> Int -> Int -> IO () -> IO ()
- f _ _ _ = id
- main :: IO ()
- main = f
- True
- if True then 1 else 0 -- Would be invalid without InlineStatements
- case True of
- True -> 1
- False -> 0
- do
- print "A"
- print "B"
- -- or:
- {-
- main = f True (if True then 1 else 0) case True of { True -> 1; False -> 0; } do { print "A"; print "B"; }
- -}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement