@@ -28,6 +28,7 @@ import Data.Monoid ((<>))
2828import qualified Data.Name as Name
2929import qualified Data.Utf8 as Utf8
3030import qualified System.Console.ANSI.Types as Ansi
31+import qualified System.Info as Info
3132import System.IO (Handle)
3233import qualified Text.PrettyPrint.ANSI.Leijen as P
3334
@@ -204,16 +205,25 @@ intToOrdinal number =
204205
205206
206207
207−cycle :: Int -> [Name.Name] -> P.Doc
208−cycle indent names =
208+cycle :: Int -> Name.Name -> [Name.Name] -> P.Doc
209+cycle indent name names =
209210 let
210− topLine = "┌─────┐"
211− nameLine name = "│ " <> P.dullyellow (fromName name)
212− midLine = "│ ↓"
213− bottomLine = "└─────┘"
211+ toLn n = cycleLn <> P.dullyellow (fromName n)
214212 in
215213 P.indent indent $ P.vcat $
216− topLine : List.intersperse midLine (map nameLine names) ++ [ bottomLine ]
214+ cycleTop : List.intersperse cycleMid (toLn name : map toLn names) ++ [ cycleEnd ]
215+
216+
217+cycleTop, cycleLn, cycleMid, cycleEnd :: P.Doc
218+cycleTop = if isWindows then "+-----+" else "┌─────┐"
219+cycleLn = if isWindows then "| " else "│ "
220+cycleMid = if isWindows then "| |" else "│ ↓"
221+cycleEnd = if isWindows then "+-<---+" else "└─────┘"
222+
223+
224+isWindows :: Bool
225+isWindows =
226+ Info.os == "mingw32"
217227
218228
219229