1-- Basic tests of overloaded labels 2 3{-# LANGUAGE OverloadedLabels 4 , DataKinds 5 , FlexibleContexts 6 , FlexibleInstances 7 , MultiParamTypeClasses 8 , NoMonomorphismRestriction 9 #-} 10 11import GHC.OverloadedLabels 12 13instance IsLabel "true" Bool where 14 fromLabel _ = True 15 16instance IsLabel "_False1'" Bool where 17 fromLabel _ = False 18 19a :: IsLabel "true" t => t 20a = #true 21 22b = #_False1' 23 24c :: Bool 25c = #true 26 27main = do print (a :: Bool) 28 print (b :: Bool) 29 print c 30