diff --git a/src/Control/Comonad.hs b/src/Control/Comonad.hs index 0d58e4c..99f7a22 100644 --- a/src/Control/Comonad.hs +++ b/src/Control/Comonad.hs @@ -204,7 +204,8 @@ instance Comonad Tree where #endif instance Comonad NonEmpty where - extend f w@ ~(_ :| aas) = f w :| case aas of + extend f w@(~(_ :| aas)) = + f w :| case aas of [] -> [] (a:as) -> toList (extend f (a :| as)) extract ~(a :| _) = a