blob: 4ecf0670316b61a5885585216f7aaba91b8de1cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|