Permalink
Browse files

Revert "Use strict composition to avoid thunk leak"

This reverts commit 35bf73b.

This is reverted because of the bug found by Edsko de Vries.
The problem is that the function may be evaluated on many branches, and throw
exception on a "wrong" branch. That also may be not very efficient if the
function is expensive.
  • Loading branch information...
1 parent 092d270 commit d075137207c5279347b7f155347c290da451acb5 @feuerbach committed Apr 20, 2012
Showing with 0 additions and 4 deletions.
  1. +0 −4 Text/Regex/Applicative/Compile.hs
@@ -2,7 +2,6 @@
{-# OPTIONS_GHC -fno-do-lambda-eta-expansion #-}
module Text.Regex.Applicative.Compile (compile) where
-import Prelude hiding ((.))
import Control.Monad.Trans.State
import Text.Regex.Applicative.Types
import Control.Applicative
@@ -12,9 +11,6 @@ import qualified Data.IntMap as IntMap
compile :: RE s a -> (a -> [Thread s r]) -> [Thread s r]
compile e k = compile2 e (SingleCont k)
-infixr 9 .
-(f . g) x = f $! g x
-
data Cont a = SingleCont !a | EmptyNonEmpty !a !a
instance Functor Cont where

0 comments on commit d075137

Please sign in to comment.