on master help sign in
Minor name changes

The 'f'/'m' distinction is potentially confusing. Also use 'elem' for consistency with other places.

commit7540bb3a9f00956500a2ae4467332063d7b54da4 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSat 30 Jan 2016, 14:05 (11 years ago) parentb042531
3 files changed+8−8
libs/prelude/Prelude/Foldable.idr+2−2 libs/prelude/Prelude/Functor.idr+5−5 test/docs003/expected+1−1
libs/prelude/Prelude/Foldable.idr+2−2
@@ -10,8 +10,8 @@ import Prelude.Algebra
1010%default total
1111
1212interface Foldable (t : Type -> Type) where
13− foldr : (elt -> acc -> acc) -> acc -> t elt -> acc
14− foldl : (acc -> elt -> acc) -> acc -> t elt -> acc
13+ foldr : (elem -> acc -> acc) -> acc -> t elem -> acc
14+ foldl : (acc -> elem -> acc) -> acc -> t elem -> acc
1515 foldl f z t = foldr (flip (.) . flip f) id t z
1616
1717||| Combine each element of a structure into a monoid
libs/prelude/Prelude/Functor.idr+5−5
@@ -10,15 +10,15 @@ interface Functor (f : Type -> Type) where
1010 ||| Apply a function across everything of type 'a' in a
1111 ||| parameterised type
1212 ||| @ f the parameterised type
13− ||| @ m the function to apply
14− map : (m : a -> b) -> f a -> f b
13+ ||| @ func the function to apply
14+ map : (func : a -> b) -> f a -> f b
1515
1616infixl 4 <$>
1717
1818||| An infix alias for `map`, applying a function across everything of
1919||| type 'a' in a parameterised type
2020||| @ f the parameterised type
21−||| @ m the function to apply
22−(<$>) : Functor f => (m : a -> b) -> f a -> f b
23−m <$> x = map m x
21+||| @ func the function to apply
22+(<$>) : Functor f => (func : a -> b) -> f a -> f b
23+func <$> x = map func x
2424
test/docs003/expected+1−1
@@ -5,7 +5,7 @@ Parameters:
55 f -- a parameterised type
66
77Methods:
8− map : Functor f => (m : a -> b) -> f a -> f b
8+ map : Functor f => (func : a -> b) -> f a -> f b
99 Apply a function across everything of type 'a' in a
1010 parameterised type
1111