Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Text/RE/Edit.lhs
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
\begin{code}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.Edit
( LineNo
Expand All @@ -11,9 +16,8 @@ module Text.RE.Edit
, applyLineEdit
) where

import Control.Applicative
import Data.Maybe
import Data.Monoid
import Prelude.Compat
import Text.RE.Capture
import Text.RE.IsRegex
import Text.RE.LineNo
Expand Down
7 changes: 6 additions & 1 deletion Text/RE/Internal/PreludeMacros.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.Internal.PreludeMacros
( RegexType(..)
Expand All @@ -18,12 +23,12 @@ module Text.RE.Internal.PreludeMacros
, preludeMacroDescriptor
) where

import Control.Applicative
import Data.Array
import qualified Data.HashMap.Lazy as HML
import Data.List
import Data.Maybe
import Data.Time
import Prelude.Compat
import Text.RE.Options
import Text.RE.Parsers
import Text.RE.TestBench
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/PCRE.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif
{-# OPTIONS_GHC -fno-warn-dodgy-exports #-}

module Text.RE.PCRE
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/PCRE/ByteString.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.PCRE.ByteString
( (*=~)
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/PCRE/ByteString/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.PCRE.ByteString.Lazy
( (*=~)
Expand Down
7 changes: 6 additions & 1 deletion Text/RE/PCRE/RE.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Text.RE.PCRE.RE
Expand Down Expand Up @@ -39,11 +44,11 @@ module Text.RE.PCRE.RE
, compileRegex
) where

import Control.Applicative
import Data.Bits
import Data.Functor.Identity
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Prelude.Compat
import Text.RE
import Text.RE.Internal.NamedCaptures
import Text.RE.Internal.PreludeMacros
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/PCRE/Sequence.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.PCRE.Sequence
( (*=~)
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/PCRE/String.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.PCRE.String
( (*=~)
Expand Down
2 changes: 2 additions & 0 deletions Text/RE/Replace.lhs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\begin{code}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
Expand Down Expand Up @@ -41,6 +42,7 @@ import qualified Data.Sequence as S
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import qualified Data.Text.Lazy as LT
import Prelude.Compat
import Text.Heredoc
import Text.RE.Capture
import Text.RE.CaptureID
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/TDFA.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif
{-# OPTIONS_GHC -fno-warn-dodgy-exports #-}

module Text.RE.TDFA
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/TDFA/ByteString.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.TDFA.ByteString
( (*=~)
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/TDFA/ByteString/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.TDFA.ByteString.Lazy
( (*=~)
Expand Down
7 changes: 6 additions & 1 deletion Text/RE/TDFA/RE.hs
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif
{-# OPTIONS_GHC -fno-warn-orphans #-}

module Text.RE.TDFA.RE
Expand Down Expand Up @@ -39,10 +44,10 @@ module Text.RE.TDFA.RE
, compileRegex
) where

import Control.Applicative
import Data.Functor.Identity
import Language.Haskell.TH
import Language.Haskell.TH.Quote
import Prelude.Compat
import Text.RE
import Text.RE.Internal.NamedCaptures
import Text.RE.Internal.PreludeMacros
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/TDFA/Sequence.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.TDFA.Sequence
( (*=~)
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/TDFA/String.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.TDFA.String
( (*=~)
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/TDFA/Text.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.TDFA.Text
( (*=~)
Expand Down
4 changes: 4 additions & 0 deletions Text/RE/TDFA/Text/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.TDFA.Text.Lazy
( (*=~)
Expand Down
16 changes: 10 additions & 6 deletions Text/RE/TestBench.lhs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
\begin{code}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.TestBench
( MacroID(..)
Expand All @@ -23,17 +28,16 @@ module Text.RE.TestBench
, formatMacroSources
, formatMacroSource
, testMacroDescriptors
-- , regexSource
) where

import Data.Array
import Control.Applicative
import qualified Data.HashMap.Lazy as HML
import Data.List
import qualified Data.List as L
import Data.Maybe
import Data.Ord
import Data.String
import Text.Printf
import Prelude.Compat
import Text.RE.Capture
import Text.RE.Options
import Text.RE.Replace
Expand Down Expand Up @@ -209,7 +213,7 @@ formatMacroTable :: RegexType -> MacroEnv -> String
formatMacroTable rty env = unlines $
format_table macro_table_hdr
[ macro_table_row rty mid md
| (mid,md) <- sortBy (comparing fst) $ HML.toList env
| (mid,md) <- L.sortBy (comparing fst) $ HML.toList env
]
\end{code}

Expand Down Expand Up @@ -240,7 +244,7 @@ formatMacroSources :: RegexType
-> String
formatMacroSources rty wc env = unlines $
[ printf "%-20s : %s" (_MacroID mid) $ formatMacroSource rty wc env mid
| mid <- sort $ HML.keys env
| mid <- L.sort $ HML.keys env
]
\end{code}

Expand Down Expand Up @@ -363,7 +367,7 @@ widths rows = listArray (minBound,maxBound)

format_row :: Array Col Int -> TableRow -> [String]
format_row cw_arr row =
[ ("|"++) $ intercalate "|"
[ ("|"++) $ L.intercalate "|"
[ field cw_arr row c i | c<-[minBound..maxBound] ]
| i <- [0..depth-1]
]
Expand Down
4 changes: 3 additions & 1 deletion Text/RE/Tools/Grep.lhs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
\begin{code}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}

module Text.RE.Tools.Grep
( grep
Expand All @@ -9,8 +11,8 @@ module Text.RE.Tools.Grep
, grepScript
) where

import Control.Applicative
import qualified Data.ByteString.Lazy.Char8 as LBS
import Prelude.Compat
import Text.Printf
import Text.RE.Capture
import Text.RE.IsRegex
Expand Down
4 changes: 3 additions & 1 deletion Text/RE/Tools/Lex.lhs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
\begin{code}
{-# LANGUAGE NoImplicitPrelude #-}

module Text.RE.Tools.Lex where

import Control.Applicative
import Prelude.Compat
import Text.RE


Expand Down
7 changes: 6 additions & 1 deletion Text/RE/Tools/Sed.lhs
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
\begin{code}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
#endif

module Text.RE.Tools.Sed
( SedScript
, sed
, sed'
) where

import Control.Applicative
import qualified Data.ByteString.Lazy.Char8 as LBS
import Prelude.Compat
import Text.RE.Edit
import Text.RE.LineNo
import Text.RE.IsRegex
Expand Down
2 changes: 1 addition & 1 deletion docs/Capture.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<link rel="stylesheet" href="lib/bs.css" type="text/css" />
</head>
<body>
<ol class='breadcrumb'><li><a href='.' title='Home'>Home</a></li> &gt; <a title='source file' href='https://github.com/iconnect/regex/blob/master/Text/RE/Capture.lhs'>RE/Capture</a></ol><div class='content'>
<ol class='breadcrumb'><li><a href='.' title='Home'>Home</a></li> &gt; <a title='source file' href='https://github.com/iconnect/regex/blob/master/src/Text/RE/Capture.lhs'>RE/Capture</a></ol><div class='content'>
<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="ot">{-# LANGUAGE RecordWildCards #-}</span>
<span class="ot">{-# LANGUAGE FlexibleInstances #-}</span>
<span class="ot">{-# LANGUAGE UndecidableInstances #-}</span>
Expand Down
12 changes: 8 additions & 4 deletions docs/Edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@
<link rel="stylesheet" href="lib/bs.css" type="text/css" />
</head>
<body>
<ol class='breadcrumb'><li><a href='.' title='Home'>Home</a></li> &gt; <a title='source file' href='https://github.com/iconnect/regex/blob/master/Text/RE/Edit.lhs'>RE/Edit</a></ol><div class='content'>
<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="ot">{-# LANGUAGE RecordWildCards #-}</span>
<ol class='breadcrumb'><li><a href='.' title='Home'>Home</a></li> &gt; <a title='source file' href='https://github.com/iconnect/regex/blob/master/src/Text/RE/Edit.lhs'>RE/Edit</a></ol><div class='content'>
<div class="sourceCode"><pre class="sourceCode literate haskell"><code class="sourceCode haskell"><span class="ot">{-# LANGUAGE NoImplicitPrelude #-}</span>
<span class="ot">{-# LANGUAGE RecordWildCards #-}</span>
<span class="ot">{-# LANGUAGE CPP #-}</span>
<span class="ot">#if __GLASGOW_HASKELL__ &gt;= 800</span>
<span class="ot">{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}</span>
<span class="ot">#endif</span>

<span class="kw">module</span> <span class="dt">Text.RE.Edit</span>
( <span class="dt">LineNo</span>
Expand All @@ -60,9 +65,8 @@
, applyLineEdit
) <span class="kw">where</span>

<span class="kw">import </span><span class="dt">Control.Applicative</span>
<span class="kw">import </span><span class="dt">Data.Maybe</span>
<span class="kw">import </span><span class="dt">Data.Monoid</span>
<span class="kw">import </span><span class="dt">Prelude.Compat</span>
<span class="kw">import </span><span class="dt">Text.RE.Capture</span>
<span class="kw">import </span><span class="dt">Text.RE.IsRegex</span>
<span class="kw">import </span><span class="dt">Text.RE.LineNo</span>
Expand Down
Loading