Skip to content

Instantly share code, notes, and snippets.

@dozed

dozed/issue.hs Secret

Created May 18, 2023 22:45
Show Gist options
  • Save dozed/41c4c6b74d5fc1c06c306d6e1783e762 to your computer and use it in GitHub Desktop.
Save dozed/41c4c6b74d5fc1c06c306d6e1783e762 to your computer and use it in GitHub Desktop.
main :: IO ()
main = toJSONFilter $ \block -> do
let blocks = toList . convertBlock $ block
return blocks
-- Ambiguous type variable ‘m0’ arising from a use of ‘return’
-- prevents the constraint ‘(Monad m0)’ from being solved.
main :: IO ()
main = toJSONFilter $ \block -> do
let blocks = toList . convertBlock $ block
return blocks :: IO [Block]
main :: IO ()
main = toJSONFilter $ fmap (\blocks -> return blocks :: IO [Block]) $ toList . convertBlock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment