projects
/
ghc-base.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update GHC.HetMet.CodeTypes using *->*->* as the kind of environment classifiers
[ghc-base.git]
/
GHC
/
HetMet
/
CodeTypes.hs
diff --git
a/GHC/HetMet/CodeTypes.hs
b/GHC/HetMet/CodeTypes.hs
index
9584607
..
31daddb
100644
(file)
--- a/
GHC/HetMet/CodeTypes.hs
+++ b/
GHC/HetMet/CodeTypes.hs
@@
-1,4
+1,4
@@
-{-# OPTIONS -XModalTypes -XMultiParamTypeClasses #-}
+{-# OPTIONS -XModalTypes -XMultiParamTypeClasses -XKindSignatures #-}
module GHC.HetMet.CodeTypes (
hetmet_brak,
hetmet_esc,
module GHC.HetMet.CodeTypes (
hetmet_brak,
hetmet_esc,
@@
-10,24
+10,20
@@
module GHC.HetMet.CodeTypes (
GuestLanguageAdd, <[ (+) ]>,
GuestLanguageSub, <[ (-) ]>, <[ negate ]>,
GuestLanguageFromInteger, <[ fromInteger ]>,
GuestLanguageAdd, <[ (+) ]>,
GuestLanguageSub, <[ (-) ]>, <[ negate ]>,
GuestLanguageFromInteger, <[ fromInteger ]>,
- GuestLanguageBool, <[ (||) ]>, <[ (&&) ]>, <[ true ]>, <[ false ]>, <[ ifThenElse ]>,
- <[ fromp ]>
+ GuestLanguageBool, <[ (||) ]>, <[ (&&) ]>, <[ true ]>, <[ false ]>, <[ ifThenElse ]>
) where
import Prelude (Integer, String, Char, Bool, error)
import GHC.HetMet.GArrow
) where
import Prelude (Integer, String, Char, Bool, error)
import GHC.HetMet.GArrow
-hetmet_brak :: forall c. forall a. a -> <[a]>@c
+hetmet_brak :: forall (c :: * -> * -> *). forall a. a -> <[a]>@c
hetmet_brak = Prelude.error "hetmet_brak should never be evaluated; did you forget to compile with -fcoqpass?"
hetmet_brak = Prelude.error "hetmet_brak should never be evaluated; did you forget to compile with -fcoqpass?"
-hetmet_esc :: forall c. forall a. <[a]>@c -> a
+hetmet_esc :: forall (c :: * -> * -> *). forall a. <[a]>@c -> a
hetmet_esc = Prelude.error "hetmet_esc should never be evaluated; did you forget to compile with -fcoqpass?"
hetmet_esc = Prelude.error "hetmet_esc should never be evaluated; did you forget to compile with -fcoqpass?"
-hetmet_csp :: forall c. forall a. a -> a
+hetmet_csp :: forall (c :: * -> * -> *). forall a. a -> a
hetmet_csp = Prelude.error "hetmet_csp should never be evaluated; did you forget to compile with -fcoqpass?"
hetmet_csp = Prelude.error "hetmet_csp should never be evaluated; did you forget to compile with -fcoqpass?"
-<[ fromp ]> :: forall a b . <[ a -> a ]>@b
-<[ fromp ]> = <[ \x -> x ]>
-
{-
-- After the flattening pass the argument and result types of this
-- function are identical (for any instantiation), so the flattener
{-
-- After the flattening pass the argument and result types of this
-- function are identical (for any instantiation), so the flattener
@@
-48,15
+44,23
@@
hetmet_flatten ::
hetmet_flatten _ = Prelude.error "hetmet_flatten should never be evaluated; did you forget to compile with -fcoqpass?"
-}
hetmet_flatten _ = Prelude.error "hetmet_flatten should never be evaluated; did you forget to compile with -fcoqpass?"
-}
+
+-- FIXME: move these and the three above to "prim" or something like that.
+
+-- Technically these functions ought to be invoked *during
+-- compilation*; in the future I would like to use Template Haskell to
+-- do that.
class GuestIntegerLiteral c where
guestIntegerLiteral :: Integer -> <[ Integer ]>@c
class GuestIntegerLiteral c where
guestIntegerLiteral :: Integer -> <[ Integer ]>@c
-
class GuestStringLiteral c where
guestStringLiteral :: String -> <[ String ]>@c
class GuestStringLiteral c where
guestStringLiteral :: String -> <[ String ]>@c
-
class GuestCharLiteral c where
guestCharLiteral :: Char -> <[ Char ]>@c
class GuestCharLiteral c where
guestCharLiteral :: Char -> <[ Char ]>@c
+
+class GuestLanguageConstant c t where
+ guestLanguageConstant :: t -> <[ t ]>@c
+
-- Note that stringwise-identical identifiers at different syntactic
-- depths are different identifiers; for this reason the operators
-- below can have a different type at syntactical depth 1 than at
-- Note that stringwise-identical identifiers at different syntactic
-- depths are different identifiers; for this reason the operators
-- below can have a different type at syntactical depth 1 than at