Temporary namespace/context in Haskell
===

In [Io](http://iolanguage.com), you can set the execution context using `do`:

    Http := Object clone
    Http get := method(uri, ("<GET request to " .. uri .. ">") println)
    Http delete := method(uri, ("<DELETE request to " .. uri .. ">") println)

    Database := Object clone
    Database insert := method(table, data, ("<insert data to " .. table .. ">") println)
    Database delete := method(table, id, ("<delete " .. id .. " from " .. table .. ">") println)

    Http do(
      get("http://example.com/")
      delete("http://example.com/something")
    )

    Database do(
      insert("cats", list("Phil", "gray"))
      delete("cats", 12)
    )

<sub>(Ruby has a similar feature with `Object#instance_exec`, but its object model is a bit more complicated.)</sub>

In effect, this gives you a temporary namespace, which is nice for writing domain specific languages. Is there a technique to achieve a similar effect (a temporary namespace) in Haskell?