on master help sign in
Delete unused utility functions
commita83adf10338753f8b4730978683940a9e3118f37 authorBenjamin Saunders <besaunde@sfu.ca> dateMon 17 Jun 2013, 18:59 (13 years ago) parent0aa3fd6
1 file changed−22
src/Idris/Primitives.hs−22
src/Idris/Primitives.hs−22
@@ -251,28 +251,6 @@ iCoerce from to op impl irop =
251251 Prim (UN $ "prim__" ++ op ++ intTyName from ++ "_" ++ intTyName to)
252252 (ty [AType . ATInt $ from] (AType . ATInt $ to)) 1 (impl from to) (1, irop from to) total
253253
254−iUn :: (Int -> Int) -> [Const] -> Maybe Const
255−iUn op [I x] = Just $ I (op x)
256−iUn _ _ = Nothing
257−
258−iBin :: (Int -> Int -> Int) -> [Const] -> Maybe Const
259−iBin op [I x, I y] = Just $ I (op x y)
260−iBin _ _ = Nothing
261−
262−bBin :: (Integer -> Integer -> Integer) -> [Const] -> Maybe Const
263−bBin op [BI x, BI y] = Just $ BI (op x y)
264−bBin _ _ = Nothing
265−
266−bBini :: (Integer -> Integer -> Int) -> [Const] -> Maybe Const
267−bBini op [BI x, BI y] = Just $ I (op x y)
268−bBini _ _ = Nothing
269−
270−biBin :: (Int -> Int -> Bool) -> [Const] -> Maybe Const
271−biBin op = iBin (\x y -> if (op x y) then 1 else 0)
272−
273−bbBin :: (Integer -> Integer -> Bool) -> [Const] -> Maybe Const
274−bbBin op = bBini (\x y -> if (op x y) then 1 else 0)
275−
276254fBin :: (Double -> Double -> Double) -> [Const] -> Maybe Const
277255fBin op [Fl x, Fl y] = Just $ Fl (op x y)
278256fBin _ _ = Nothing