Commit c072740b authored by Björn Peemöller 's avatar Björn Peemöller
Browse files

Removed obsolete comments

parent f8bd9340
......@@ -2,7 +2,7 @@
Module : $Header$
Description : Extraction of free and bound variables
Copyright : (c) Wolfgang Lux
2011 - 2012 Björn Peemöller
2011 - 2015 Björn Peemöller
2015 Jan Tikovsky
License : OtherLicense
......@@ -183,33 +183,3 @@ instance Expr TypeExpr where
filterBv :: QuantExpr e => e -> [Ident] -> [Ident]
filterBv e = filter (`Set.notMember` Set.fromList (bv e))
-- Since multiple variable occurrences are allowed in function patterns,
-- it is necessary to compute the list of bound variables in a different way:
-- Each variable occuring in the function pattern will be unique in the result
-- list.
-- bv (FunctionPattern f ts) = bvFuncPatt $ FunctionPattern f ts
-- bv (InfixFuncPattern t1 op t2) = bvFuncPatt $ InfixFuncPattern t1 op t2
-- bvFuncPatt :: Pattern -> [Ident]
-- bvFuncPatt = bvfp []
-- where
-- bvfp bvs (LiteralPattern _) = bvs
-- bvfp bvs (NegativePattern _ _) = bvs
-- bvfp bvs (VariablePattern v)
-- | v `elem` bvs = bvs
-- | otherwise = v : bvs
-- bvfp bvs (ConstructorPattern _ ts) = foldl bvfp bvs ts
-- bvfp bvs (InfixPattern t1 _ t2) = foldl bvfp bvs [t1, t2]
-- bvfp bvs (ParenPattern t) = bvfp bvs t
-- bvfp bvs (TuplePattern _ ts) = foldl bvfp bvs ts
-- bvfp bvs (ListPattern _ ts) = foldl bvfp bvs ts
-- bvfp bvs (AsPattern v t)
-- | v `elem` bvs = bvfp bvs t
-- | otherwise = bvfp (v : bvs) t
-- bvfp bvs (LazyPattern _ t) = bvfp bvs t
-- bvfp bvs (FunctionPattern _ ts) = foldl bvfp bvs ts
-- bvfp bvs (InfixFuncPattern t1 _ t2) = foldl bvfp bvs [t1, t2]
-- bvfp bvs (RecordPattern fs r)
-- = foldl bvfp (maybe bvs (bvfp bvs) r) (map fieldTerm fs)
{- |
Module : $Header$
Description : Auxiliary functions
Description : Auxiliary functions
Copyright : (c) 2001 - 2003 Wolfgang Lux
2011 - 2015 Björn Peemöler
License : OtherLicense
Maintainer : bjp@informatik.uni-kiel.de
......@@ -24,30 +25,9 @@ infixr 5 ++!
-- The Prelude does not contain standard functions for triples.
-- We provide projection, (un-)currying, and mapping for triples here.
-- fst3 :: (a, b, c) -> a
-- fst3 (x, _, _) = x
-- snd3 :: (a, b, c) -> b
-- snd3 (_, y, _) = y
thd3 :: (a, b, c) -> c
thd3 (_, _, z) = z
-- apFst3 :: (a -> d) -> (a, b, c) -> (d, b, c)
-- apFst3 f (x, y, z) = (f x, y, z)
-- apSnd3 :: (b -> d) -> (a, b, c) -> (a, d, c)
-- apSnd3 f (x, y, z) = (x, f y, z)
-- apThd3 :: (c -> d) -> (a, b, c) -> (a, b, d)
-- apThd3 f (x, y, z) = (x, y, f z)
-- curry3 :: ((a, b, c) -> d) -> a -> b -> c -> d
-- curry3 f x y z = f (x, y, z)
-- uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d
-- The function (++!) is variant of the list concatenation operator (++)
-- that ignores the second argument if the first is a non-empty list.
-- When lists are used to encode non-determinism in Haskell,
......@@ -57,14 +37,6 @@ thd3 (_, _, z) = z
(++!) :: [a] -> [a] -> [a]
xs ++! ys = if null xs then ys else xs
-- The function 'foldl_strict' is a strict version of foldl,
-- i.e., it evaluates the binary applications before the recursion.
-- This has the advantage that 'foldl_strict' does not construct a
-- large application which is then evaluated in the base case of
-- the recursion.
-- foldl_strict :: (a -> b -> a) -> a -> [b] -> a
-- foldl_strict = foldl'
-- Fold operations with two arguments lists can be defined using
-- zip and foldl or foldr, resp. Our definitions are unfolded for
-- efficiency reasons.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment