You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.
module Endo where
import Prelude hiding (Monoid)
class Monoid a where
mempty :: a
mappend :: a -> a -> a
mconcat :: [a] -> a
newtype Endo a = Endo { appEndo :: a -> a }
instance Monoid (Endo a) where
mempty = Endo id
Endo f `mappend` Endo g = Endo (f . g)
mconcat = foldr Endo.mappend Endo.mempty
produces
Local Definition instance_Monoid__Endo_a__mempty : (Endo a) :=
Mk_Endo id.
Note how a is not bound!
The text was updated successfully, but these errors were encountered:
This code (also in
examples/test/Endo.v
)produces
Note how
a
is not bound!The text was updated successfully, but these errors were encountered: