swap <[]> and <{}> syntax
[ghc-base.git] / GHC / HetMet / CodeTypes.hs
1 {-# LANGUAGE ModalTypes, MultiParamTypeClasses, KindSignatures, FlexibleContexts #-}
2 -----------------------------------------------------------------------------
3 -- |
4 -- Module      :  GHC.HetMet.CodeTypes
5 -- Copyright   :  none
6 -- License     :  public domain
7 --
8 -- Maintainer  :  Adam Megacz <megacz@acm.org>
9 -- Stability   :  experimental
10 -- Portability :  portable
11 module GHC.HetMet.CodeTypes (
12   hetmet_brak,
13   hetmet_esc,
14   hetmet_csp,
15   GuestIntegerLiteral, guestIntegerLiteral,
16   GuestStringLiteral, guestStringLiteral,
17   GuestCharLiteral, guestCharLiteral
18 ) where
19
20 hetmet_brak :: forall (c :: * -> * -> *). forall a. a -> <{a}>@c
21 hetmet_brak = Prelude.error "hetmet_brak should never be evaluated; did you forget to compile with -fcoqpass?"
22
23 hetmet_esc  :: forall (c :: * -> * -> *). forall a. <{a}>@c -> a
24 hetmet_esc = Prelude.error "hetmet_esc should never be evaluated; did you forget to compile with -fcoqpass?"
25
26 hetmet_csp :: forall (c :: * -> * -> *). forall a. a -> a
27 hetmet_csp = Prelude.error "hetmet_csp should never be evaluated; did you forget to compile with -fcoqpass?"
28
29 -- Technically these functions ought to be invoked *during
30 -- compilation*; in the future I would like to use Template Haskell to
31 -- do that.
32 class GuestIntegerLiteral c where
33   guestIntegerLiteral :: Integer -> <{ Integer }>@c
34 class GuestStringLiteral c where
35   guestStringLiteral :: String -> <{ String }>@c
36 class GuestCharLiteral c where
37   guestCharLiteral :: Char -> <{ Char }>@c