Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

newtype support; turn on safe haskell

  • Loading branch information...
commit c315d370aab4bd39d31e6aa1f7fdcc83f3846b19 1 parent 9a2c3d6
@mikeplus64 authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/Language/Haskell/Repl.hs
View
8 src/Language/Haskell/Repl.hs
@@ -149,6 +149,7 @@ defaultImports
,"import Data.Function hiding ((.), id)"
,"import Control.Arrow"
,"import Data.List"
+ ,"import Data.Maybe"
,"import Data.Semigroup"
,"import Control.Monad"
,"import Control.Monad.Fix"
@@ -221,6 +222,7 @@ repl' imports exts inp out wait ewait len = do
"data" -> True
"class" -> True
"type" -> True
+ "newtype" -> True
_ -> False
@@ -237,6 +239,10 @@ repl' imports exts inp out wait ewait len = do
getExts = foldr (fmap . flip xopt_set) id
session = do
s <- getProgramDynFlags
- _ <- setSessionDynFlags (getExts exts s)
+ _ <- setSessionDynFlags
+ $ (\d -> d { safeHaskell = Sf_SafeInferred })
+ . flip dopt_set Opt_DoCoreLinting
+ $ getExts exts s
+
getSessionDynFlags
Please sign in to comment.
Something went wrong with that request. Please try again.