Skip to content
This repository has been archived by the owner on Sep 22, 2019. It is now read-only.

Commit

Permalink
re-indent wibble in Plugin.hs, add a newline to Annotation.hs and cle…
Browse files Browse the repository at this point in the history
…an up NonTerminating test a little
  • Loading branch information
austin s committed Nov 21, 2010
1 parent 97a9624 commit f10a304
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Strict/Annotation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import Data.Data
-- | Programs which want to 'strictify' their functions should annotate them with the following
-- datatype
-- TODO: move this into a separate package perhaps?
data Strictify = Strictify deriving (Typeable, Data)
data Strictify = Strictify deriving (Typeable, Data)
2 changes: 1 addition & 1 deletion Strict/Plugin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import GHCPlugins

plugin :: Plugin
plugin = defaultPlugin {
installCoreToDos = install
installCoreToDos = install
}

install :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
Expand Down
10 changes: 2 additions & 8 deletions tests/NonTerminating.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,11 @@
module Main ( main ) where
import Strict.Annotation

import Control.Exception ( evaluate )

evaluate_and_possibly_timeout what = do
val <- evaluate what
putStrLn $ "Test failed due to the thing compiled terminating with value: " ++ show val

{-# ANN foreverFrom Strictify #-}
foreverFrom :: Int -> [Int]
foreverFrom n = n : foreverFrom (n + 1)

main :: IO ()
main = do
let xs = foreverFrom 0
evaluate_and_possibly_timeout (take 10 xs)
let xs = foreverFrom 0
print (take 10 xs)

0 comments on commit f10a304

Please sign in to comment.