overloadedlabelsfail01.hs 354 Bytes
Newer Older
Adam Gundry's avatar
Adam Gundry committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{-# LANGUAGE OverloadedLabels, DataKinds, FlexibleContexts #-}

import GHC.OverloadedLabels

-- No instance for (OverloadedLabel "x" t0)
a = #x

-- No instance for (OverloadedLabel "x" (t0 -> t1), OverloadedLabel "y" t0)
b = #x #y

-- Could not deduce (OverloadedLabel "y" t) from (OverloadedLabel "x" t)
c :: IsLabel "x" t => t
c = #y

main = return ()