Skip to content

Commit

Permalink
write direct Uniplate instances for performance
Browse files Browse the repository at this point in the history
  • Loading branch information
raehik committed Aug 16, 2021
1 parent 9045cfd commit ad3ad5c
Show file tree
Hide file tree
Showing 8 changed files with 383 additions and 8 deletions.
377 changes: 376 additions & 1 deletion src/Language/Fortran/AST.hs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Language/Fortran/Analysis.hs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ where

import Prelude hiding (exp)
import Language.Fortran.Util.Position (SrcSpan)
import Data.Generics.Uniplate.Data
import Data.Generics.Uniplate.DataOnly
import Data.Data
import Language.Fortran.AST
import Language.Fortran.LValue
Expand Down
2 changes: 1 addition & 1 deletion src/Language/Fortran/Analysis/ModGraph.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables, PatternGuards, TupleSections #-}
{-# LANGUAGE DeriveDataTypeable, ScopedTypeVariables, PatternGuards, TupleSections, FlexibleContexts #-}

-- | Generate a module use-graph.
module Language.Fortran.Analysis.ModGraph
Expand Down
2 changes: 1 addition & 1 deletion src/Language/Fortran/Analysis/Renaming.hs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import qualified Data.List as L
import Data.Map (insert, empty, lookup, Map)
import qualified Data.Map.Strict as M
import Control.Monad.State.Strict
import Data.Generics.Uniplate.Data
import Data.Generics.Uniplate.DataOnly
import Data.Data
import Data.Functor.Identity (Identity)

Expand Down
2 changes: 1 addition & 1 deletion src/Language/Fortran/Analysis/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import qualified Data.Map as M
import Data.Maybe (maybeToList)
import Data.List (find)
import Control.Monad.State.Strict
import Data.Generics.Uniplate.Data
import Data.Generics.Uniplate.DataOnly
import Data.Data
import Data.Functor.Identity (Identity ())
import Language.Fortran.Analysis
Expand Down
2 changes: 1 addition & 1 deletion src/Language/Fortran/Util/ModFile.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import Control.Monad.State
import Data.Binary (Binary, encode, decodeOrFail)
import qualified Data.ByteString.Lazy.Char8 as LB
import Data.Data
import Data.Generics.Uniplate.Operations
import Data.Generics.Uniplate.DataOnly
import qualified Data.Map.Strict as M
import Data.Maybe
import GHC.Generics (Generic)
Expand Down
2 changes: 1 addition & 1 deletion test/Language/Fortran/PrettyPrintSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Language.Fortran.PrettyPrintSpec where
import Prelude hiding (mod)

import Data.Data
import Data.Generics.Uniplate.Operations
import Data.Generics.Uniplate.DataOnly
import Data.Maybe (catMaybes)

import Language.Fortran.AST as LFA
Expand Down
2 changes: 1 addition & 1 deletion test/TestUtil.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module TestUtil where

import Test.Hspec
import Data.Data
import Data.Generics.Uniplate.Data
import Data.Generics.Uniplate.DataOnly

import Language.Fortran.AST
import Language.Fortran.ParserMonad
Expand Down

0 comments on commit ad3ad5c

Please sign in to comment.