graph-trace/Test.hs
2021-10-09 14:55:57 -05:00

18 lines
355 B
Haskell

{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
module DebugPlugin.Test where
import Data.Kind
import GHC.TypeLits
type Debug (str :: Symbol) = (?x :: String)
test :: (Debug "yo", Num r) => r -> IO String
test _ = do
x <- getLine
let ?x = x
pure ?x