diff options
author | stuebinm | 2022-01-02 01:55:17 +0100 |
---|---|---|
committer | stuebinm | 2022-01-02 01:55:49 +0100 |
commit | 98faf732052c24766b0abfc38ce6b7178c226a61 (patch) | |
tree | 17a25f5cffe7844666b882b317b469c43f723ae2 /lib | |
parent | 706aa316d463f613ee0d3d661c5e8159f1be1b08 (diff) |
playing around with types
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 |