Initial commit

This commit is contained in:
La Ancapo 2026-01-25 02:27:22 +01:00
commit c101616e62
309 changed files with 53937 additions and 0 deletions

View file

@ -0,0 +1,21 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE NoImplicitPrelude #-}
module Basement.Environment
( getArgs
, lookupEnv
) where
import Basement.Compat.Base
import Basement.UTF8.Base (String)
import qualified System.Environment as Sys (getArgs, lookupEnv)
-- | Returns a list of the program's command line arguments (not including the program name).
getArgs :: IO [String]
getArgs = fmap fromList <$> Sys.getArgs
-- | Lookup variable in the environment
lookupEnv :: String -> IO (Maybe String)
lookupEnv s = fmap fromList <$> Sys.lookupEnv (toList s)