<commit_before>-----------------------------------------------------------------------------
-- |
-- Copyright   : (C) 2015 <NAME>
-- License     : BSD3
--
-- Maintainer  : <NAME> <<EMAIL>>
-- Stability   : experimental
-- Portability : portable
--
----------------------------------------------------------------------------

import Control.Monad ( unless )
import Data.Maybe ( fromMaybe )
import Qzr.Init
import System.Environment ( getArgs )
import System.FilePath

import Prelude hiding ( init )

data Command
  = Init (Maybe FilePath)
    deriving (Eq,Show)

instance Read Command where
  readsPrec _ s = case words s of
      ("init":xs) -> processInit xs
      _ -> []
    where
      processInit xs = case xs of
        [path] -> [(Init (Just path),"")]
        _ -> [(Init Nothing,"")]

dispatchCommand :: Command -> IO ()
dispatchCommand cmd = case cmd of
  Init path -> init (fromMaybe "./" path)

main :: IO ()
main = do
  args <- getArgs
  let<commit_msg>Support 'new shader'.<commit_after>-----------------------------------------------------------------------------
-- |
-- Copyright   : (C) 2015 <NAME>
-- License     : BSD3
--
-- Maintainer  : <NAME> <<EMAIL>>
-- Stability   : experimental
-- Portability : portable
--
----------------------------------------------------------------------------

import Control.Monad ( unless )
import Data.Maybe ( fromMaybe )
import Qzr.Init
import Qzr.New.Shader
import System.Environment ( getArgs )
import System.FilePath

import Prelude hiding ( init )

data Command
  = Init (Maybe FilePath)
  | NewShader String
    deriving (Eq,Show)

instance Read Command where
  readsPrec _ s = case words s of
      ("init":xs) -> processInit xs
      ("new":xs) -> processNew xs
      _ -> []
    where
      processInit xs = case xs of
        [path] -> [(Init (Just path),"")]
        _ -> [(Init Nothing,"")]
      processNew xs = case xs of
        ["shader",name] -> [(NewShader name,"")]
        _ -> []

dispatchCommand :: Command -> IO ()
dispatchCommand cmd = case cmd of
  Init path -> init (fromMaybe "./" path)
  NewShader name -> newShader name

main :: IO ()
main = do
  args <- getArgs
  let
{'fraction_non_alphanumeric': 0.26090993500464255, 'fraction_numerical': 0.004642525533890436, 'mean_word_length': 1.6248477466504263, 'pattern_counts': {'":': 3, '<': 13, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3994866', 'n_tokens_mistral': 601, 'n_tokens_neox': 569, 'n_words': 186}