packages feed

hls-splice-plugin 1.0.0.2 → 1.0.0.3

raw patch · 41 files changed

+239/−269 lines, 41 filesdep −directorydep −shakedep ~ghcidenew-uploaderPVP ok

version bump matches the API change (PVP)

Dependencies removed: directory, shake

Dependency ranges changed: ghcide

API changes (from Hackage documentation)

Files

hls-splice-plugin.cabal view
@@ -1,6 +1,6 @@ cabal-version:      2.4 name:               hls-splice-plugin-version:            1.0.0.2+version:            1.0.0.3 synopsis:   HLS Plugin to expand TemplateHaskell Splices and QuasiQuotes @@ -19,8 +19,6 @@ build-type:         Simple extra-source-files:   LICENSE-  test/testdata/*.error-  test/testdata/*.expected   test/testdata/*.hs   test/testdata/*.yaml @@ -33,19 +31,18 @@   hs-source-dirs:     src   build-depends:     , aeson-    , base                  >=4.12    && <5+    , base                  >=4.12 && <5     , containers     , dlist     , extra     , foldl     , ghc     , ghc-exactprint-    , ghcide                ^>=1.2+    , ghcide                >=1.2  && <1.5     , hls-plugin-api        ^>=1.1     , lens     , lsp     , retrie-    , shake     , syb     , text     , transformers@@ -65,9 +62,7 @@   ghc-options:      -threaded -rtsopts -with-rtsopts=-N   build-depends:     , base-    , directory-    , extra     , filepath     , hls-splice-plugin-    , hls-test-utils  ^>= 1.0+    , hls-test-utils     ^>=1.0     , text
src/Ide/Plugin/Splice.hs view
@@ -6,6 +6,7 @@ {-# LANGUAGE GADTs                 #-} {-# LANGUAGE LambdaCase            #-} {-# LANGUAGE MagicHash             #-}+{-# LANGUAGE NamedFieldPuns        #-} {-# LANGUAGE OverloadedStrings     #-} {-# LANGUAGE RankNTypes            #-} {-# LANGUAGE RecordWildCards       #-}@@ -14,7 +15,6 @@ {-# LANGUAGE TypeApplications      #-} {-# LANGUAGE TypeFamilies          #-} {-# LANGUAGE ViewPatterns          #-}-{-# LANGUAGE NamedFieldPuns        #-}  module Ide.Plugin.Splice     ( descriptor,@@ -24,7 +24,8 @@ import           Control.Applicative             (Alternative ((<|>))) import           Control.Arrow import qualified Control.Foldl                   as L-import           Control.Lens                    (ix, view, (%~), (<&>), (^.), Identity(..))+import           Control.Lens                    (Identity (..), ix, view, (%~),+                                                  (<&>), (^.)) import           Control.Monad import           Control.Monad.Extra             (eitherM) import qualified Control.Monad.Fail              as Fail@@ -100,7 +101,7 @@             reportEditor                 MtWarning                 [ "Expansion in type-chcking phase failed;"-                , "trying to expand manually, but note taht it is less rigorous."+                , "trying to expand manually, but note that it is less rigorous."                 ]             pm <-                 liftIO $
test/Main.hs view
@@ -1,135 +1,109 @@-{-# LANGUAGE CPP                   #-}-{-# LANGUAGE DataKinds             #-} {-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE NamedFieldPuns        #-} {-# LANGUAGE OverloadedStrings     #-}-{-# LANGUAGE ScopedTypeVariables   #-} {-# LANGUAGE TypeOperators         #-} {-# LANGUAGE ViewPatterns          #-} -module Main (main) where+module Main+  ( main+  ) where -import           Control.Monad+import           Control.Monad           (void) import           Data.List               (find) import           Data.Text               (Text) import qualified Data.Text               as T import qualified Data.Text.IO            as T import qualified Ide.Plugin.Splice       as Splice import           Ide.Plugin.Splice.Types-import           System.Directory import           System.FilePath-import           System.Time.Extra       (sleep) import           Test.Hls  main :: IO () main = defaultTestRunner tests -plugin :: PluginDescriptor IdeState-plugin = Splice.descriptor "splice"+splicePlugin :: PluginDescriptor IdeState+splicePlugin = Splice.descriptor "splice"  tests :: TestTree-tests =-    testGroup-        "splice"-        [ goldenTest "TSimpleExp.hs" Inplace 6 15-        , goldenTest "TSimpleExp.hs" Inplace 6 24-        , goldenTest "TTypeAppExp.hs" Inplace 7 5-        , goldenTest "TErrorExp.hs" Inplace 6 15-        , goldenTest "TErrorExp.hs" Inplace 6 51-        , goldenTest "TQQExp.hs" Inplace 6 17-        , goldenTest "TQQExp.hs" Inplace 6 25-        , goldenTest "TQQExpError.hs" Inplace 6 13-        , goldenTest "TQQExpError.hs" Inplace 6 22-        , testGroup "Pattern Splices"-            [ goldenTest "TSimplePat.hs" Inplace 6 3-            , goldenTest "TSimplePat.hs" Inplace 6 22-            , goldenTest "TSimplePat.hs" Inplace 6 3-            , goldenTest "TSimplePat.hs" Inplace 6 22-            , goldenTest "TErrorPat.hs" Inplace 6 3-            , goldenTest "TErrorPat.hs" Inplace 6 18-            , goldenTest "TQQPat.hs" Inplace 6 3-            , goldenTest "TQQPat.hs" Inplace 6 11-            , goldenTest "TQQPatError.hs" Inplace 6 3-            , goldenTest "TQQPatError.hs" Inplace 6 11-            ]-        , goldenTest "TSimpleType.hs" Inplace 5 12-        , goldenTest "TSimpleType.hs" Inplace 5 22-        , goldenTest "TTypeTypeError.hs" Inplace 7 12-        , goldenTest "TTypeTypeError.hs" Inplace 7 52-        , goldenTest "TQQType.hs" Inplace 8 19-        , goldenTest "TQQType.hs" Inplace 8 28-        , goldenTest "TQQTypeTypeError.hs" Inplace 8 19-        , goldenTest "TQQTypeTypeError.hs" Inplace 8 28-        , goldenTest "TSimpleDecl.hs" Inplace 8 1-        , goldenTest "TQQDecl.hs" Inplace 5 1-        , goldenTestWithEdit "TTypeKindError.hs" Inplace 7 9-        , goldenTestWithEdit "TDeclKindError.hs" Inplace 8 1-        ]+tests = testGroup "splice"+  [ goldenTest "TSimpleExp" Inplace 6 15+  , goldenTest "TSimpleExp" Inplace 6 24+  , goldenTest "TTypeAppExp" Inplace 7 5+  , goldenTest "TErrorExp" Inplace 6 15+  , goldenTest "TErrorExp" Inplace 6 51+  , goldenTest "TQQExp" Inplace 6 17+  , goldenTest "TQQExp" Inplace 6 25+  , goldenTest "TQQExpError" Inplace 6 13+  , goldenTest "TQQExpError" Inplace 6 22+  , testGroup "Pattern Splices"+      [ goldenTest "TSimplePat" Inplace 6 3+      , goldenTest "TSimplePat" Inplace 6 22+      , goldenTest "TSimplePat" Inplace 6 3+      , goldenTest "TSimplePat" Inplace 6 22+      , goldenTest "TErrorPat" Inplace 6 3+      , goldenTest "TErrorPat" Inplace 6 18+      , goldenTest "TQQPat" Inplace 6 3+      , goldenTest "TQQPat" Inplace 6 11+      , goldenTest "TQQPatError" Inplace 6 3+      , goldenTest "TQQPatError" Inplace 6 11+      ]+  , goldenTest "TSimpleType" Inplace 5 12+  , goldenTest "TSimpleType" Inplace 5 22+  , goldenTest "TTypeTypeError" Inplace 7 12+  , goldenTest "TTypeTypeError" Inplace 7 52+  , goldenTest "TQQType" Inplace 8 19+  , goldenTest "TQQType" Inplace 8 28+  , goldenTest "TQQTypeTypeError" Inplace 8 19+  , goldenTest "TQQTypeTypeError" Inplace 8 28+  , goldenTest "TSimpleDecl" Inplace 8 1+  , goldenTest "TQQDecl" Inplace 5 1+  , goldenTestWithEdit "TTypeKindError" Inplace 7 9+  , goldenTestWithEdit "TDeclKindError" Inplace 8 1+  ]  goldenTest :: FilePath -> ExpandStyle -> Int -> Int -> TestTree-goldenTest input tc line col =-    testCase (input <> " (golden)") $ do-        runSessionWithServer plugin spliceTestPath $ do-            doc <- openDoc input "haskell"-            _ <- waitForDiagnostics-            actions <- getCodeActions doc $ pointRange line col-            case find ((== Just (toExpandCmdTitle tc)) . codeActionTitle) actions of-                Just (InR CodeAction {_command = Just c}) -> do-                    executeCommand c-                    _resp <- skipManyTill anyMessage (message SWorkspaceApplyEdit)-                    edited <- documentContents doc-                    let expected_name = input <.> "expected"-                    -- Write golden tests if they don't already exist-                    liftIO $-                        (doesFileExist expected_name >>=) $-                            flip unless $ do-                                T.writeFile expected_name edited-                    expected <- liftIO $ T.readFile expected_name-                    liftIO $ edited @?= expected-                _ -> liftIO $ assertFailure "No CodeAction detected"+goldenTest fp tc line col =+  goldenWithHaskellDoc splicePlugin (fp <> " (golden)") testDataDir fp "expected" "hs" $ \doc -> do+    _ <- waitForDiagnostics+    actions <- getCodeActions doc $ pointRange line col+    case find ((== Just (toExpandCmdTitle tc)) . codeActionTitle) actions of+      Just (InR CodeAction {_command = Just c}) -> do+        executeCommand c+        void $ skipManyTill anyMessage (message SWorkspaceApplyEdit)+      _ -> liftIO $ assertFailure "No CodeAction detected"  goldenTestWithEdit :: FilePath -> ExpandStyle -> Int -> Int -> TestTree-goldenTestWithEdit input tc line col =-    testCase (input <> " (golden)") $ do-        runSessionWithServer plugin spliceTestPath $ do-            doc <- openDoc input "haskell"-            orig <- documentContents doc-            let lns = T.lines orig-                theRange =-                    Range-                        { _start = Position 0 0-                        , _end = Position (length lns + 1) 1-                        }-            liftIO $ sleep 3-            alt <- liftIO $ T.readFile (input <.> "error")-            void $ applyEdit doc $ TextEdit theRange alt-            changeDoc doc [TextDocumentContentChangeEvent (Just theRange) Nothing alt]-            void waitForDiagnostics-            actions <- getCodeActions doc $ pointRange line col-            case find ((== Just (toExpandCmdTitle tc)) . codeActionTitle) actions of-                Just (InR CodeAction {_command = Just c}) -> do-                    executeCommand c-                    _resp <- skipManyTill anyMessage (message SWorkspaceApplyEdit)-                    edited <- documentContents doc-                    let expected_name = input <.> "expected"-                    -- Write golden tests if they don't already exist-                    liftIO $-                        (doesFileExist expected_name >>=) $-                            flip unless $ do-                                T.writeFile expected_name edited-                    expected <- liftIO $ T.readFile expected_name-                    liftIO $ edited @?= expected-                _ -> liftIO $ assertFailure "No CodeAction detected"+goldenTestWithEdit fp tc line col =+  goldenWithHaskellDoc splicePlugin (fp <> " (golden)") testDataDir fp "expected" "hs" $ \doc -> do+     orig <- documentContents doc+     let+       lns = T.lines orig+       theRange =+         Range+         { _start = Position 0 0+         , _end = Position (length lns + 1) 1+         }+     waitForProgressDone -- cradle+     waitForProgressDone+     alt <- liftIO $ T.readFile (fp <.> "error.hs")+     void $ applyEdit doc $ TextEdit theRange alt+     changeDoc doc [TextDocumentContentChangeEvent (Just theRange) Nothing alt]+     void waitForDiagnostics+     actions <- getCodeActions doc $ pointRange line col+     case find ((== Just (toExpandCmdTitle tc)) . codeActionTitle) actions of+       Just (InR CodeAction {_command = Just c}) -> do+         executeCommand c+         void $ skipManyTill anyMessage (message SWorkspaceApplyEdit)+       _ -> liftIO $ assertFailure "No CodeAction detected" -spliceTestPath :: FilePath-spliceTestPath = "test" </> "testdata"+testDataDir :: FilePath+testDataDir = "test" </> "testdata"  pointRange :: Int -> Int -> Range-pointRange-    (subtract 1 -> line)-    (subtract 1 -> col) =-        Range (Position line col) (Position line $ col + 1)+pointRange (subtract 1 -> line) (subtract 1 -> col) =+  Range (Position line col) (Position line $ col + 1)  -- | Get the title of a code action. codeActionTitle :: (Command |? CodeAction) -> Maybe Text-codeActionTitle InL{}                               = Nothing-codeActionTitle (InR(CodeAction title _ _ _ _ _ _ _)) = Just title+codeActionTitle InL {}                    = Nothing+codeActionTitle (InR CodeAction {_title}) = Just _title
+ test/testdata/TDeclKindError.error.hs view
@@ -0,0 +1,16 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE QuasiQuotes #-}+module TSimpleDecl where+import Language.Haskell.TH ( mkName, clause, normalB, funD, sigD )++-- Foo+--  Bar+$(sequence+    [sigD (mkName "foo") [t|Int|]+    ,funD (mkName "foo") [clause [] (normalB [|42|]) []]+    ,sigD (mkName "bar") [t|Int|]+    ]+    )+-- Bar+-- ee+-- dddd
+ test/testdata/TDeclKindError.expected.hs view
@@ -0,0 +1,13 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE QuasiQuotes #-}+module TSimpleDecl where+import Language.Haskell.TH ( mkName, clause, normalB, funD, sigD )++-- Foo+--  Bar+foo :: Int+foo = 42+bar :: Int+-- Bar+-- ee+-- dddd
− test/testdata/TDeclKindError.hs.error
@@ -1,16 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE QuasiQuotes #-}-module TSimpleDecl where-import Language.Haskell.TH ( mkName, clause, normalB, funD, sigD )---- Foo---  Bar-$(sequence-    [sigD (mkName "foo") [t|Int|]-    ,funD (mkName "foo") [clause [] (normalB [|42|]) []]-    ,sigD (mkName "bar") [t|Int|]-    ]-    )--- Bar--- ee--- dddd
− test/testdata/TDeclKindError.hs.expected
@@ -1,13 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE QuasiQuotes #-}-module TSimpleDecl where-import Language.Haskell.TH ( mkName, clause, normalB, funD, sigD )---- Foo---  Bar-foo :: Int-foo = 42-bar :: Int--- Bar--- ee--- dddd
+ test/testdata/TErrorExp.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE TemplateHaskell #-}+module TErrorExp where+import Language.Haskell.TH ( tupE, litE, integerL )++main :: IO ()+main = return (42, ())
− test/testdata/TErrorExp.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module TErrorExp where-import Language.Haskell.TH ( tupE, litE, integerL )--main :: IO ()-main = return (42, ())
+ test/testdata/TErrorPat.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE TemplateHaskell #-}+module TErrorPat where+import Language.Haskell.TH ( conP )++f :: () -> ()+f True = x
− test/testdata/TErrorPat.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module TErrorPat where-import Language.Haskell.TH ( conP )--f :: () -> ()-f True = x
+ test/testdata/TQQDecl.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE QuasiQuotes #-}+module TQQDecl where+import QQ (str)++foo :: String+foo = "foo"
− test/testdata/TQQDecl.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE QuasiQuotes #-}-module TQQDecl where-import QQ (str)--foo :: String-foo = "foo"
+ test/testdata/TQQExp.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE QuasiQuotes #-}+module TQQExp where+import QQ++main :: IO ()+main = putStrLn "str"
− test/testdata/TQQExp.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE QuasiQuotes #-}-module TQQExp where-import QQ--main :: IO ()-main = putStrLn "str"
+ test/testdata/TQQExpError.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE QuasiQuotes #-}+module TQQExpError where+import QQ++main :: IO ()+main = pure "str"
− test/testdata/TQQExpError.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE QuasiQuotes #-}-module TQQExpError where-import QQ--main :: IO ()-main = pure "str"
+ test/testdata/TQQPat.expected.hs view
@@ -0,0 +1,7 @@+{-# LANGUAGE QuasiQuotes #-}+module TQQPat where+import QQ++f :: String -> IO ()+f "str" = putStrLn "is str"+f _ = putStrLn " not str"
− test/testdata/TQQPat.hs.expected
@@ -1,7 +0,0 @@-{-# LANGUAGE QuasiQuotes #-}-module TQQPat where-import QQ--f :: String -> IO ()-f "str" = putStrLn "is str"-f _ = putStrLn " not str"
+ test/testdata/TQQPatError.expected.hs view
@@ -0,0 +1,7 @@+{-# LANGUAGE QuasiQuotes #-}+module TQQPatError where+import QQ++f :: () -> IO ()+f "str" = putStrLn "is str"+f _ = putStrLn " not str"
− test/testdata/TQQPatError.hs.expected
@@ -1,7 +0,0 @@-{-# LANGUAGE QuasiQuotes #-}-module TQQPatError where-import QQ--f :: () -> IO ()-f "str" = putStrLn "is str"-f _ = putStrLn " not str"
+ test/testdata/TQQType.expected.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE QuasiQuotes #-}+module TQQType where+import Language.Haskell.TH ( appT, numTyLit, litT, conT )+import Data.Proxy ( Proxy(..) )+import QQ++main :: IO (Proxy "str")+main = return Proxy
− test/testdata/TQQType.hs.expected
@@ -1,9 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE QuasiQuotes #-}-module TQQType where-import Language.Haskell.TH ( appT, numTyLit, litT, conT )-import Data.Proxy ( Proxy(..) )-import QQ--main :: IO (Proxy "str")-main = return Proxy
+ test/testdata/TQQTypeTypeError.expected.hs view
@@ -0,0 +1,9 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE QuasiQuotes #-}+module TQQTypeTypeError where+import Language.Haskell.TH ( appT, numTyLit, litT, conT )+import Data.Proxy ( Proxy(..) )+import QQ++main :: IO (Proxy "str")+main = return ()
− test/testdata/TQQTypeTypeError.hs.expected
@@ -1,9 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE QuasiQuotes #-}-module TQQTypeTypeError where-import Language.Haskell.TH ( appT, numTyLit, litT, conT )-import Data.Proxy ( Proxy(..) )-import QQ--main :: IO (Proxy "str")-main = return ()
+ test/testdata/TSimpleDecl.expected.hs view
@@ -0,0 +1,12 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE QuasiQuotes #-}+module TSimpleDecl where+import Language.Haskell.TH ( mkName, clause, normalB, funD, sigD )++-- Foo+--  Bar+foo :: Int+foo = 42+-- Bar+-- ee+-- dddd
− test/testdata/TSimpleDecl.hs.expected
@@ -1,12 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE QuasiQuotes #-}-module TSimpleDecl where-import Language.Haskell.TH ( mkName, clause, normalB, funD, sigD )---- Foo---  Bar-foo :: Int-foo = 42--- Bar--- ee--- dddd
+ test/testdata/TSimpleExp.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE TemplateHaskell #-}+module TSimpleExp where+import Language.Haskell.TH ( tupE, litE, integerL )++main :: IO ()+main = return ()
− test/testdata/TSimpleExp.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module TSimpleExp where-import Language.Haskell.TH ( tupE, litE, integerL )--main :: IO ()-main = return ()
+ test/testdata/TSimplePat.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE TemplateHaskell #-}+module TSimplePat where+import Language.Haskell.TH ( varP, mkName )++f :: x -> x+f x = x
− test/testdata/TSimplePat.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module TSimplePat where-import Language.Haskell.TH ( varP, mkName )--f :: x -> x-f x = x
+ test/testdata/TSimpleType.expected.hs view
@@ -0,0 +1,6 @@+{-# LANGUAGE TemplateHaskell #-}+module TSimpleType where+import Language.Haskell.TH ( tupleT )++main :: IO ()+main = return ()
− test/testdata/TSimpleType.hs.expected
@@ -1,6 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-module TSimpleType where-import Language.Haskell.TH ( tupleT )--main :: IO ()-main = return ()
+ test/testdata/TTypeAppExp.expected.hs view
@@ -0,0 +1,7 @@+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeApplications #-}+module TTypeAppExp where+import Data.Proxy++f :: Proxy Int+f = Proxy @Int
− test/testdata/TTypeAppExp.hs.expected
@@ -1,7 +0,0 @@-{-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE TypeApplications #-}-module TTypeAppExp where-import Data.Proxy--f :: Proxy Int-f = (Proxy @Int)
+ test/testdata/TTypeKindError.error.hs view
@@ -0,0 +1,8 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE TemplateHaskell #-}+module TTypeKindError where+import Language.Haskell.TH ( numTyLit, litT )+import Data.Proxy ( Proxy )++main :: $(litT (numTyLit 42))+main = return ()
+ test/testdata/TTypeKindError.expected.hs view
@@ -0,0 +1,8 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE TemplateHaskell #-}+module TTypeKindError where+import Language.Haskell.TH ( numTyLit, litT )+import Data.Proxy ( Proxy )++main :: (42)+main = return ()
− test/testdata/TTypeKindError.hs.error
@@ -1,8 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TemplateHaskell #-}-module TTypeKindError where-import Language.Haskell.TH ( numTyLit, litT )-import Data.Proxy ( Proxy )--main :: $(litT (numTyLit 42))-main = return ()
− test/testdata/TTypeKindError.hs.expected
@@ -1,8 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TemplateHaskell #-}-module TTypeKindError where-import Language.Haskell.TH ( numTyLit, litT )-import Data.Proxy ( Proxy )--main :: (42)-main = return ()
+ test/testdata/TTypeTypeError.expected.hs view
@@ -0,0 +1,8 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE TemplateHaskell #-}+module TTypeTypeError where+import Language.Haskell.TH ( appT, numTyLit, litT, conT )+import Data.Proxy ( Proxy )++main :: IO (Proxy 42)+main = return ()
− test/testdata/TTypeTypeError.hs.expected
@@ -1,8 +0,0 @@-{-# LANGUAGE DataKinds #-}-{-# LANGUAGE TemplateHaskell #-}-module TTypeTypeError where-import Language.Haskell.TH ( appT, numTyLit, litT, conT )-import Data.Proxy ( Proxy )--main :: IO (Proxy 42)-main = return ()