summaryrefslogtreecommitdiff
path: root/testsuite/tests/qualifieddo/should_run/qdorun007.hs
blob: 189c045e582caf1687fa5e8474c2809539ee0b9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE QualifiedDo #-}
-- Tests that QualfiedDo works for a linear monad.

import Monad.Linear as Linear


main = do
  let r = runTM (Linear.do
        t0 <- newT
        t1 <- increaseT t0
        (t2, ur) <- extractT t1
        deleteT t2
        Linear.return ur)
  print r
  print r