bollu/symengine.hs

View on GitHub

Showing 159 of 159 total issues

Eta reduce
Open

diff expr symbol = (lift_basicsym_binaryop basic_diff_ffi) expr symbol
Severity: Minor
Found in src/Symengine/BasicSym.hs by hlint

Found

diff expr symbol
  = (lift_basicsym_binaryop basic_diff_ffi) expr symbol

Perhaps

diff = (lift_basicsym_binaryop basic_diff_ffi)

Redundant bracket
Open

instance Matrix (DenseMatrix) where
Severity: Minor
Found in src/Symengine/DenseMatrix.hs by hlint

Found

(DenseMatrix)

Perhaps

DenseMatrix

Unused LANGUAGE pragma
Open

{-# LANGUAGE GeneralizedNewtypeDeriving #-}
Severity: Minor
Found in src/Symengine/BasicSym.hs by hlint

Found

{-# LANGUAGE GeneralizedNewtypeDeriving #-}

Perhaps

Unused LANGUAGE pragma
Open

{-# LANGUAGE FunctionalDependencies #-}
Severity: Minor
Found in src/Symengine/DenseMatrix.hs by hlint

Found

{-# LANGUAGE FunctionalDependencies #-}

Perhaps

Applying this change:

  • may require {-# LANGUAGE MultiParamTypeClasses #-} adding to the top of the file

Unused LANGUAGE pragma
Open

{-# LANGUAGE RecordWildCards #-}
Severity: Minor
Found in src/Symengine/BasicSym.hs by hlint

Found

{-# LANGUAGE RecordWildCards #-}

Perhaps

Applying this change:

  • may require {-# LANGUAGE DisambiguateRecordFields #-} adding to the top of the file

Unused LANGUAGE pragma
Open

{-# LANGUAGE RecordWildCards #-}
Severity: Minor
Found in src/Symengine/VecBasic.hs by hlint

Found

{-# LANGUAGE RecordWildCards #-}

Perhaps

Applying this change:

  • may require {-# LANGUAGE DisambiguateRecordFields #-} adding to the top of the file

Unused LANGUAGE pragma
Open

{-# LANGUAGE RecordWildCards #-}
Severity: Minor
Found in src/Symengine/DenseMatrix.hs by hlint

Found

{-# LANGUAGE RecordWildCards #-}

Perhaps

Applying this change:

  • may require {-# LANGUAGE DisambiguateRecordFields #-} adding to the top of the file

Use fewer imports
Open

import Control.Monad -- for foldM
Severity: Minor
Found in src/Symengine/BasicSym.hs by hlint

Found

import Control.Monad
import Control.Monad

Perhaps

import Control.Monad

Eta reduce
Open

intToCInt i = toEnum i
Severity: Minor
Found in src/Symengine/BasicSym.hs by hlint

Found

intToCInt i = toEnum i

Perhaps

intToCInt = toEnum

Avoid lambda
Open

vecbasic_push_back vec sym =  with2 vec sym (\v p ->vecbasic_push_back_ffi v p)
Severity: Minor
Found in src/Symengine/VecBasic.hs by hlint

Found

\ v p -> vecbasic_push_back_ffi v p

Perhaps

vecbasic_push_back_ffi

Eta reduce
Open

    with (DenseMatrix p) f = withForeignPtr p f
Severity: Minor
Found in src/Symengine/DenseMatrix.hs by hlint

Found

with (DenseMatrix p) f = withForeignPtr p f

Perhaps

with (DenseMatrix p) = withForeignPtr p

Unused LANGUAGE pragma
Open

{-# LANGUAGE RecordWildCards #-}
Severity: Minor
Found in src/Symengine/NumberTheory.hs by hlint

Found

{-# LANGUAGE RecordWildCards #-}

Perhaps

Applying this change:

  • may require {-# LANGUAGE DisambiguateRecordFields #-} adding to the top of the file

Unused LANGUAGE pragma
Open

{-# LANGUAGE FunctionalDependencies #-}
Severity: Minor
Found in src/Symengine/VecBasic.hs by hlint

Found

{-# LANGUAGE FunctionalDependencies #-}

Perhaps

Applying this change:

  • may require {-# LANGUAGE MultiParamTypeClasses #-} adding to the top of the file

Unused LANGUAGE pragma
Open

{-# LANGUAGE TypeApplications #-}
Severity: Minor
Found in src/Symengine/VecBasic.hs by hlint

Found

{-# LANGUAGE TypeApplications #-}

Perhaps

Unused LANGUAGE pragma
Open

{-# LANGUAGE FunctionalDependencies #-}
Severity: Minor
Found in src/Symengine/BasicSym.hs by hlint

Found

{-# LANGUAGE FunctionalDependencies #-}

Perhaps

Applying this change:

  • may require {-# LANGUAGE MultiParamTypeClasses #-} adding to the top of the file

Redundant as-pattern
Open

  error @ _ -> throwIO error
Severity: Minor
Found in src/Symengine/Internal.hs by hlint

Found

error@_

Perhaps

error

Redundant return
Open

mkForeignPtr cons des = do
  rawptr <- cons
  finalized <- newForeignPtr des rawptr
  return  finalized
Severity: Minor
Found in src/Symengine/Internal.hs by hlint

Found

do rawptr <- cons
   finalized <- newForeignPtr des rawptr
   return finalized

Perhaps

do rawptr <- cons
   newForeignPtr des rawptr

Use fewer imports
Open

import Control.Monad -- for foldM
Severity: Minor
Found in src/Symengine/DenseMatrix.hs by hlint

Found

import Control.Monad
import Control.Monad

Perhaps

import Control.Monad

Use camelCase
Open

basic_pow :: BasicSym -> BasicSym -> BasicSym
Severity: Minor
Found in src/Symengine/BasicSym.hs by hlint

Found

basic_pow :: BasicSym -> BasicSym -> BasicSym

Perhaps

basicPow :: BasicSym -> BasicSym -> BasicSym

Use camelCase
Open

densematrix_new_zeros :: forall r c. (KnownNat r, KnownNat c) => DenseMatrix r c
Severity: Minor
Found in src/Symengine/DenseMatrix.hs by hlint

Found

densematrix_new_zeros ::
  forall r c. (KnownNat r, KnownNat c) => DenseMatrix r c

Perhaps

densematrixNewZeros ::
  forall r c. (KnownNat r, KnownNat c) => DenseMatrix r c
Severity
Category
Status
Source
Language