Skip to content

Instantly share code, notes, and snippets.

@tomsmeding
Last active June 18, 2020 15:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomsmeding/326fa7361ee19af34c06cb6f7ad7d20e to your computer and use it in GitHub Desktop.
Save tomsmeding/326fa7361ee19af34c06cb6f7ad7d20e to your computer and use it in GitHub Desktop.
ghcide fails on this repository, because of the non-exported variable reference in a TH splice
{-# LANGUAGE TemplateHaskell #-}
module Error ( somethfunc ) where
import Language.Haskell.TH hiding ( Unsafe )
somethfunc :: Q Exp
somethfunc = [| glorifiedID |]
glorifiedID :: a -> a
glorifiedID = id
cabal-version: 2.2
name: ghcide-th-fail
version: 0.1.0.0
author: Tom Smeding
maintainer: tom.smeding@gmail.com
build-type: Simple
executable ghcide-th-fail
hs-source-dirs: .
main-is: Main.hs
other-modules: Error
default-language: Haskell2010
ghc-options: -O2 -Wall
build-depends: base >=4.13 && <4.14, template-haskell
{-# LANGUAGE TemplateHaskell #-}
module Main where
import Error
main :: IO ()
main = $somethfunc (putStrLn "success!")
resolver: lts-15.8
packages:
- .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment