Cabalize ext-core tools
[ghc-hetmet.git] / utils / ext-core / Language / Core / PrimCoercions.hs
diff --git a/utils/ext-core/Language/Core/PrimCoercions.hs b/utils/ext-core/Language/Core/PrimCoercions.hs
new file mode 100644 (file)
index 0000000..e6851d8
--- /dev/null
@@ -0,0 +1,26 @@
+{-# OPTIONS -Wall -fno-warn-missing-signatures #-}
+module Language.Core.PrimCoercions where
+import Language.Core.Core
+
+-- Stuff the parser needs to know about
+
+pv :: a -> Qual a
+pv = qual primMname
+
+pvz :: Id -> Qual Id
+pvz = (qual primMname) . (++ "zh")
+
+{- Coercions -}
+symCoercion, transCoercion, unsafeCoercion,
+ leftCoercion, rightCoercion, instCoercion :: Qual Tcon
+symCoercion    = pv "sym"
+transCoercion  = pv "trans"
+unsafeCoercion = pv "CoUnsafe"
+leftCoercion   = pv "left"
+rightCoercion  = pv "right"
+instCoercion   = pv "inst"
+
+{- Addrzh -}
+tcAddrzh = pvz "Addr"
+tAddrzh = Tcon tcAddrzh
+ktAddrzh = Kunlifted