aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2022-05-10 17:15:04 +0200
committerTom Smeding <tom@tomsmeding.com>2022-05-10 17:15:04 +0200
commitb01799a5dbbc3443567c2127de79f0ff354b5e57 (patch)
treeee3e8bdc51f321ec17cde96bc4fd9518c2c0421a
Initial
-rw-r--r--.gitignore1
-rw-r--r--Foo.hs8
-rw-r--r--Main.hs14
-rw-r--r--cabal.project2
-rw-r--r--repro.cabal15
5 files changed, 40 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c33954f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+dist-newstyle/
diff --git a/Foo.hs b/Foo.hs
new file mode 100644
index 0000000..0c38272
--- /dev/null
+++ b/Foo.hs
@@ -0,0 +1,8 @@
+module Foo where
+
+import Data.Typeable
+import Language.Haskell.TH
+
+
+foo :: Typeable a => Code Q a -> Code Q ()
+foo = undefined
diff --git a/Main.hs b/Main.hs
new file mode 100644
index 0000000..d1995e1
--- /dev/null
+++ b/Main.hs
@@ -0,0 +1,14 @@
+{-# LANGUAGE TemplateHaskell #-}
+{-# LANGUAGE TypeApplications #-}
+module Main where
+
+import Foo
+
+
+data T a = T a
+ deriving (Show)
+
+main :: IO ()
+main = do
+ let x = $$(foo @(T Int) [|| T 1 ||])
+ return ()
diff --git a/cabal.project b/cabal.project
new file mode 100644
index 0000000..73f99e3
--- /dev/null
+++ b/cabal.project
@@ -0,0 +1,2 @@
+packages: .
+with-compiler: ghc-9.2.2
diff --git a/repro.cabal b/repro.cabal
new file mode 100644
index 0000000..53b613c
--- /dev/null
+++ b/repro.cabal
@@ -0,0 +1,15 @@
+cabal-version: 1.12
+name: repro
+version: 0.1.0.0
+author: Tom Smeding
+copyright: 2022 Tom Smeding
+license: MIT
+build-type: Simple
+
+executable test
+ main-is: Main.hs
+ other-modules: Foo
+ hs-source-dirs: .
+ ghc-options: -Wall
+ build-depends: base >=4.7 && <4.17, template-haskell
+ default-language: Haskell2010