summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_compile/Proposal229f_instances.hs
blob: 2bd5a8ee19b5a0b8c01715eba83c150956474489 (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
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}

module Proposal229f_instances where

import GHC.Exts
import Data.String
import Language.Haskell.TH
import Language.Haskell.TH.Syntax

instance IsList (Q (TExp String)) where
  type Item (Q (TExp String)) = Char
  fromList = liftTyped
  toList = undefined

instance IsList (Q Exp) where
  type Item (Q Exp) = Char
  fromList = lift
  toList = undefined

instance IsString (Q (TExp String)) where
  fromString = liftTyped

instance IsString (Q Exp) where
  fromString = lift