Is there a list of GHC extensions that are considered ‘safe’?

It’s probably best to look at what SafeHaskell allows: Safe Language The Safe Language (enabled through -XSafe) restricts things in two different ways: Certain GHC LANGUAGE extensions are disallowed completely. Certain GHC LANGUAGE extensions are restricted in functionality. Below is precisely what flags and extensions fall into each category: Disallowed completely: GeneralizedNewtypeDeriving, TemplateHaskell Restricted functionality: … Read more

In what sense is the IO Monad pure?

I think the best explanation I’ve heard was actually fairly recently on SO. IO Foo is a recipe for creating a Foo. Another common, more literal, way of saying this is that it is a “program that produces a Foo“. It can be executed (many times) to create a Foo or die trying. The execution … Read more