Package

purescript-which

Repository
maxdeviant/purescript-which
License
MIT
Uploaded by
maxdeviant
Published on
2020-09-26

PureScript bindings for which.

Installation

spago install which

You will also need to have which installed:

Yarn

yarn add which

npm

npm i which

Usage

module Main where

import Prelude
import Data.Maybe (Maybe(..))
import Effect (Effect)
import Effect.Console (log)
import Which (whichSync)

main :: Effect Unit
main = do
  let
    commandToFind = "neofetch"
  command <- whichSync Nothing commandToFind
  log
    $ case command of
        Just found -> "Found " <> commandToFind <> " at " <> found
        Nothing -> "Did not find " <> commandToFind
Modules
Which
Dependencies