Last active
June 18, 2020 15:57
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Error ( somethfunc ) where | |
import Language.Haskell.TH hiding ( Unsafe ) | |
somethfunc :: Q Exp | |
somethfunc = [| glorifiedID |] | |
glorifiedID :: a -> a | |
glorifiedID = id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Main where | |
import Error | |
main :: IO () | |
main = $somethfunc (putStrLn "success!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resolver: lts-15.8 | |
packages: | |
- . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment