Skip to content

Commit e06b009

Browse files
committed
test that the value in a Data.Var.Var doesn't get converted #435
1 parent 42d1104 commit e06b009

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/VarPtr.hs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module VarPtr where
2+
3+
import Data.Var
4+
5+
data Record = Record Int
6+
7+
main = do
8+
v <- newVar $ Record 5
9+
subscribeAndRead v $ \y -> case y of
10+
Record a -> putStrLn . show $ a
11+
set v $ Record 10

tests/VarPtr.res

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
5
2+
10

0 commit comments

Comments
 (0)