summaryrefslogtreecommitdiff
path: root/Reactor/Filtered.hs
blob: d106053c5a3fb2b4dc5d55abc2a2440768aa4d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Reactor.Filtered where

import Prelude hiding (filter)
import qualified Prelude

class Filtered f where
  filter :: (a -> Bool) -> f a -> f a

instance Filtered [] where
  filter = Prelude.filter

instance Filtered Maybe where
  filter p m@(Just a) | p a = m
  filter _ _ = Nothing