on master help sign in
Merge pull request #3464 from justjoheinz/fix/pure

Remove deprecated calls to return

commitecc4bb7c0200f1992e1c45214bbe4da48e591bbb authorJan de Muijnck-Hughes <jfdm@users.noreply.github.com> dateThu 29 Sep 2016, 22:20 (10 years ago) parentd1eccd8a596776
2 files changed+3−3
samples/effects/TreeTag.idr+2−2 samples/tutorial/classes.idr+1−1
samples/effects/TreeTag.idr+2−2
@@ -20,13 +20,13 @@ testTree = Node (Node Leaf "Jim" Leaf)
2020 (Node Leaf "Bob" Leaf))
2121
2222treeTagAux : BTree a -> { [STATE Int] } Eff (BTree (Int, a))
23−treeTagAux Leaf = return Leaf
23+treeTagAux Leaf = pure Leaf
2424treeTagAux (Node l x r)
2525 = do l' <- treeTagAux l
2626 i <- get
2727 put (i + 1)
2828 r' <- treeTagAux r
29− return (Node l' (i, x) r')
29+ pure (Node l' (i, x) r')
3030
3131treeTag : (i : Int) -> BTree a -> BTree (Int, a)
3232treeTag i x = runPure (do put i
samples/tutorial/classes.idr+1−1
@@ -1,7 +1,7 @@
11m_add : Maybe Int -> Maybe Int -> Maybe Int
22m_add x y = do x' <- x -- Extract value from x
33 y' <- y -- Extract value from y
4− return (x' + y') -- Add them
4+ pure (x' + y') -- Add them
55
66m_add' : Maybe Int -> Maybe Int -> Maybe Int
77m_add' x y = [ x' + y' | x' <- x, y' <- y ]