1module Idris.Unlit(unlit) where
6unlit :: FilePath -> String -> TC String
7unlit f s = do let s' = map ulLine (lines s)
9 return $ unlines (map snd s')
11data LineType = Prog | Blank | Comm
13ulLine :: String -> (LineType, String)
14ulLine ('>':' ':xs) = (Prog, xs)
15ulLine ('>':xs) = (Prog, xs)
16ulLine xs | all isSpace xs = (Blank, "")
17-- make sure it's not a doc comment
18 | otherwise = (Comm, '-':'-':' ':'>':xs)
20check :: FilePath -> Int -> [(LineType, String)] -> TC ()
21check f l (a:b:cs) = do chkAdj f l (fst a) (fst b)
23check f l [x] = return ()
24check f l [] = return ()
26-- Issue #1593 on the issue checker.
28-- https://github.com/idris-lang/Idris-dev/issues/1593
30chkAdj :: FilePath -> Int -> LineType -> LineType -> TC ()
31chkAdj f l Prog Comm = tfail $ At (FC f (l, 0) (l, 0)) ProgramLineComment --TODO: Span correctly
32chkAdj f l Comm Prog = tfail $ At (FC f (l, 0) (l, 0)) ProgramLineComment --TODO: Span correctly
33chkAdj f l _ _ = return ()
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list