removeNonConcrete :: [TlExpr] -> DebugOr [TlExpr]
removeNonConcrete = mkSuccess . mapMaybe onlyIfConcrete
  where
    onlyIfConcrete tl = case tl of
      TlDef _ (Unquantified _) _ -> Just tl
      TlFuncDef {} -> Just tl
      _ -> Nothing

-- | Transform constants that have a lambda initializers to functions.
removeNonConcrete :: [TlExpr] -> DebugOr [TlExpr]
removeNonConcrete = mkSuccess . mapMaybe onlyIfConcrete
  where
    onlyIfConcrete tl = case tl of
      TlDef _ (Unquantified _) _ -> Just tl
      TlFuncDef {} -> Just tl
      _ -> Nothing

-- | Transform constants that have a lambda initializers to functions.
removeNonConcrete = mkSuccess . mapMaybe onlyIfConcrete
  where
    onlyIfConcrete tl = case tl of
      TlDef _ (Unquantified _) _ -> Just tl
      TlFuncDef {} -> Just tl
      _ -> Nothing

-- | Transform constants that have a lambda initializers to functions.