summaryrefslogtreecommitdiff
path: root/lib/CommandLine.hs
diff options
context:
space:
mode:
authorjoe <joe@blackbird>2016-04-25 16:04:56 -0400
committerjoe <joe@blackbird>2016-04-25 16:04:56 -0400
commitf70ad35a93aec70be1b7fbc31946153ceb6015c5 (patch)
tree1a9d0f19fa6282cc32532327e163c2b465c19a15 /lib/CommandLine.hs
parent20babd097f4d5726e6020c4e021d3592faf2f8db (diff)
Hand coded Functor instance.
Diffstat (limited to 'lib/CommandLine.hs')
-rw-r--r--lib/CommandLine.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CommandLine.hs b/lib/CommandLine.hs
index dfc16f9..88584ce 100644
--- a/lib/CommandLine.hs
+++ b/lib/CommandLine.hs
@@ -65,7 +65,13 @@ data Expr a where
65 -- Alternative empty 65 -- Alternative empty
66 Empty :: Expr a 66 Empty :: Expr a
67 67
68deriving instance Functor Expr 68-- deriving instance Functor Expr -- doesn't work on ghc 7.6.3
69instance Functor Expr where
70 fmap f (Prim g i) = Prim (\os us -> f $ g os us) i
71 fmap f (Star m a b) = Star m (fmap (f .) a) b
72 fmap f (Or m a b) = Or m (fmap f a) (fmap f b)
73 fmap f Empty = Empty
74
69 75
70-- | Args 76-- | Args
71-- 77--