begin
This commit is contained in:
		
							
								
								
									
										19
									
								
								exe/Main.hs
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								exe/Main.hs
									
									
									
									
									
								
							@ -1,4 +1,21 @@
 | 
				
			|||||||
module Main where
 | 
					module Main where
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import System.Posix.Directory ( getWorkingDirectory )
 | 
				
			||||||
 | 
					import System.Directory.Extra ( listContents )
 | 
				
			||||||
 | 
					import Control.Monad          ( (<=<), filterM )
 | 
				
			||||||
 | 
					import System.Process         ( ProcessHandle, spawnCommand )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					fetchLocalAudio :: FilePath -> IO [FilePath]
 | 
				
			||||||
 | 
					fetchLocalAudio = filterM isAudioVideo <=< listContents
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					isAudioVideo :: FilePath -> IO Bool
 | 
				
			||||||
 | 
					isAudioVideo = undefined
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					-- Paths need to be escaped if containing certain characters
 | 
				
			||||||
 | 
					playHeadless :: FilePath -> IO ProcessHandle
 | 
				
			||||||
 | 
					playHeadless = spawnCommand . (++) "mpv --vid=no "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
main :: IO ()
 | 
					main :: IO ()
 | 
				
			||||||
main = putStrLn "Hello, Haskell!"
 | 
					main =
 | 
				
			||||||
 | 
					  getWorkingDirectory >>= \a ->
 | 
				
			||||||
 | 
					  pure ()
 | 
				
			||||||
 | 
				
			|||||||
@ -75,6 +75,7 @@ executable snaus
 | 
				
			|||||||
                    , directory
 | 
					                    , directory
 | 
				
			||||||
                    , vty
 | 
					                    , vty
 | 
				
			||||||
                    , hashmap-io
 | 
					                    , hashmap-io
 | 
				
			||||||
 | 
					                    , process
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    -- Directories containing source files.
 | 
					    -- Directories containing source files.
 | 
				
			||||||
    hs-source-dirs:   exe
 | 
					    hs-source-dirs:   exe
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user