git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix bug with show directive not being correctly completed
52885bdŁukasz Hanuszczak
psci/Directive.hs+3−2
@@ -15,7 +15,7 @@
15
15
16module Directive where
16module Directive where
17
17
18−import Data.List (isPrefixOf)
18+import Data.List (nub, isPrefixOf)
19
19
20data Directive
20data Directive
21 = Help
21 = Help
@@ -27,6 +27,7 @@ data Directive
27 | Type
27 | Type
28 | Kind
28 | Kind
29 | Show
29 | Show
30+ deriving Eq
30
31
31-- |
32-- |
32-- Maps given directive relating command strings.
33-- Maps given directive relating command strings.
@@ -78,4 +79,4 @@ help =
78-- List of all avaliable directives.
79-- List of all avaliable directives.
79--
80--
80directives :: [Directive]
81directives :: [Directive]
81−directives = map (\(dir, _, _) -> dir) help
82+directives = nub . map (\(dir, _, _) -> dir) $ help