Skip to content

Instantly share code, notes, and snippets.

@vvv
Created January 24, 2019 13:09
Show Gist options
  • Save vvv/991b1ac975268c113c5c29714680b039 to your computer and use it in GitHub Desktop.
Save vvv/991b1ac975268c113c5c29714680b039 to your computer and use it in GitHub Desktop.
#!/usr/bin/env stack
-- stack --resolver lts-9.21 script --package loch-th
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -Wall -Werror #-}
import Debug.Trace.LocationTH (check)
import System.Environment (getArgs)
main :: IO ()
main = do
argc <- length <$> getArgs
let f = if argc == 0 then id else $check
print . f $ head ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment