diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/KindLinter.hs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/KindLinter.hs b/lib/KindLinter.hs new file mode 100644 index 0000000..4ecf067 --- /dev/null +++ b/lib/KindLinter.hs @@ -0,0 +1,29 @@ +{-# LANGUAGE DataKinds #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE TypeApplications #-} + +module KindLinter where + +import Data.Map.Strict +import Data.HList +import GHC.TypeLits (Symbol, KnownSymbol) + + +func :: a -> HList [Int, String] +func _ = hBuild 10 "test" + +field :: forall a. KnownSymbol a => Label a +field = Label + + +record = + Label @"test" .=. 10 .*. + field @"x" .=. 20 .*. + emptyRecord + +-- TODO: these should be limited to Tagged "symbol" (LintWriter a) +tileLints = + field @"test" .=. (\a -> a) .*. + emptyRecord |