Terminal loop cleanup.
@@ -302,7 +302,12 @@ instance FromNoun Ev where
-- Short Event Names -----------------------------------------------------------
-getSpinnerNameForEvent :: Ev -> Maybe String
+{-
+ In the case of the user hitting enter, the cause is technically a
+ terminal event, but we don't display any name because the cause is
+ really the user.
+-}
+getSpinnerNameForEvent :: Ev -> Maybe Text
getSpinnerNameForEvent = \case
EvVane _ -> Nothing
EvBlip b -> case b of
@@ -314,11 +319,8 @@ getSpinnerNameForEvent = \case
BlipEvHttpServer _ -> Just "eyre"
BlipEvNewt _ -> Just "newt"
BlipEvSync _ -> Just "clay"
- BlipEvTerm t -> case t of
- TermEvBelt _ belt -> case belt of
- -- In the case of the user hitting enter, the cause is technically a
- -- terminal event, but we don't display any name because the cause is
- -- really the user.
- Ret () -> Nothing
- _ -> Just "term"
- _ -> Just "term"
+ BlipEvTerm t | isRet t -> Nothing
+ BlipEvTerm t -> Just "term"
+ where
+ isRet (TermEvBelt _ (Ret ())) = True
+ isRet _ = False
