@@ -24,11 +24,6 @@ ty :: [Const] -> Const -> Type
24ty [] x = Constant x
24ty [] x = Constant x
25ty (t:ts) x = Bind (MN 0 "T") (Pi (Constant t)) (ty ts x)
25ty (t:ts) x = Bind (MN 0 "T") (Pi (Constant t)) (ty ts x)
28−believeTy = Bind (UN "a") (Pi (TType (UVar (-2))))
29− (Bind (UN "b") (Pi (TType (UVar (-2))))
30− (Bind (UN "x") (Pi (V 1)) (V 1)))
32total, partial :: Totality
27total, partial :: Totality
33total = Total []
28total = Total []
34partial = Partial NotCovering
29partial = Partial NotCovering
@@ -178,9 +173,7 @@ primitives =
178 (0, LVMPtr) total,
173 (0, LVMPtr) total,
179 -- Streams
174 -- Streams
180 Prim (UN "prim__stdin") (ty [] PtrType) 0 (p_cantreduce)
175 Prim (UN "prim__stdin") (ty [] PtrType) 0 (p_cantreduce)
181− (0, LStdIn) partial,
176+ (0, LStdIn) partial
182− Prim (UN "prim__believe_me") believeTy 3 (p_believeMe)
183− (3, LNoOp) partial -- ahem
184 ] ++ concatMap intOps [IT8, IT16, IT32, IT64, ITBig, ITNative]
177 ] ++ concatMap intOps [IT8, IT16, IT32, IT64, ITBig, ITNative]
186intOps :: IntTy -> [Prim]
179intOps :: IntTy -> [Prim]
@@ -229,10 +222,6 @@ iCoerce from to op impl irop =
229 Prim (UN $ "prim__" ++ op ++ intTyName from ++ "_" ++ intTyName to)
222 Prim (UN $ "prim__" ++ op ++ intTyName from ++ "_" ++ intTyName to)
230 (ty [intTyToConst from] (intTyToConst to)) 1 (impl from to) (1, irop from to) total
223 (ty [intTyToConst from] (intTyToConst to)) 1 (impl from to) (1, irop from to) total
232−p_believeMe :: [a] -> Maybe a
233−p_believeMe [_,_,x] = Just x
234−p_believeMe _ = Nothing
236iUn :: (Int -> Int) -> [Const] -> Maybe Const
225iUn :: (Int -> Int) -> [Const] -> Maybe Const
237iUn op [I x] = Just $ I (op x)
226iUn op [I x] = Just $ I (op x)
238iUn _ _ = Nothing
227iUn _ _ = Nothing