on master help sign in
Remove deprecated calls to return
a596776Markus Klink
samples/effects/TreeTag.idr+2−2
@@ -20,13 +20,13 @@ testTree = Node (Node Leaf "Jim" Leaf)
20 (Node Leaf "Bob" Leaf))
20 (Node Leaf "Bob" Leaf))
21
21
22treeTagAux : BTree a -> { [STATE Int] } Eff (BTree (Int, a))
22treeTagAux : BTree a -> { [STATE Int] } Eff (BTree (Int, a))
23−treeTagAux Leaf = return Leaf
23+treeTagAux Leaf = pure Leaf
24treeTagAux (Node l x r)
24treeTagAux (Node l x r)
25 = do l' <- treeTagAux l
25 = do l' <- treeTagAux l
26 i <- get
26 i <- get
27 put (i + 1)
27 put (i + 1)
28 r' <- treeTagAux r
28 r' <- treeTagAux r
29− return (Node l' (i, x) r')
29+ pure (Node l' (i, x) r')
30
30
31treeTag : (i : Int) -> BTree a -> BTree (Int, a)
31treeTag : (i : Int) -> BTree a -> BTree (Int, a)
32treeTag i x = runPure (do put i
32treeTag i x = runPure (do put i
samples/tutorial/classes.idr+1−1
@@ -1,7 +1,7 @@
1m_add : Maybe Int -> Maybe Int -> Maybe Int
1m_add : Maybe Int -> Maybe Int -> Maybe Int
2m_add x y = do x' <- x -- Extract value from x
2m_add x y = do x' <- x -- Extract value from x
3 y' <- y -- Extract value from y
3 y' <- y -- Extract value from y
4− return (x' + y') -- Add them
4+ pure (x' + y') -- Add them
5
5
6m_add' : Maybe Int -> Maybe Int -> Maybe Int
6m_add' : Maybe Int -> Maybe Int -> Maybe Int
7m_add' x y = [ x' + y' | x' <- x, y' <- y ]
7m_add' x y = [ x' + y' | x' <- x, y' <- y ]