This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
module Test5 where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
import AddTopDecls | |
main = print $testAddTopDecls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | This code is from an FP Complete internal tool, and isn't | |
-- necessarily fit for packaging. It's released under the MIT | |
-- license. | |
module ExtractTopLevel (main) where | |
import Data.Char (isSpace) | |
import Data.Generics.Schemes (listify) | |
import Data.List (find) | |
import qualified Language.Haskell.Exts as Simple | |
import Language.Haskell.Exts.Annotated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Concurrent (threadDelay) | |
import Control.Concurrent.Async (async, poll, cancel) | |
import Control.Concurrent.STM (atomically, newTVarIO, readTVar, writeTVar, check) | |
import Control.Exception (uninterruptibleMask) | |
main :: IO () | |
main = do | |
-- Block on a 'TVar', under an 'uninterruptibleMask'. I would | |
-- expect this to mean that the thread isn't canceleable, and only | |
-- finishes when 'var' is set to 'True'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mgsloan@computer:~/fpco/ghc-7.10-sandbox$ hsenv --ghc=../ghc-7.10.1.tar.xz | |
Creating Virtual Haskell directory structure | |
Installing GHC | |
Installing GHC from ../ghc-7.10.1.tar.xz | |
Initializing GHC Package database at /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/ghc_pkg_db | |
Copying necessary packages from original GHC package database | |
Using user-wide (~/.cabal/packages) Hackage download cache directory | |
Installing cabal config at /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/cabal/config | |
Installing activate script | |
Installing cabal wrapper using /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/cabal/config at /home/mgsloan/fpco/ghc-7.10-sandbox/.hsenv/bin/cabal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/yesod-bin/BuildProgram.hs b/yesod-bin/BuildProgram.hs | |
new file mode 100644 | |
index 0000000..2bdf11b | |
--- /dev/null | |
+++ b/yesod-bin/BuildProgram.hs | |
@@ -0,0 +1,50 @@ | |
+module BuildProgram where | |
+ | |
+import System.Exit (ExitCode (..), exitWith) | |
+import System.Process (ProcessHandle, createProcess, getProcessExitCode, proc) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Stack/Build.hs b/src/Stack/Build.hs | |
index 9b00447..50b8d61 100644 | |
--- a/src/Stack/Build.hs | |
+++ b/src/Stack/Build.hs | |
@@ -53,7 +53,7 @@ build :: M env m | |
=> (Set (Path Abs File) -> IO ()) -- ^ callback after discovering all local files | |
-> BuildOpts | |
-> m () | |
-build setLocalFiles bopts = do | |
+build setLocalFiles bopts = errorWhenUnsupported bopts $ do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Stack/Build.hs b/src/Stack/Build.hs | |
index 9b00447..50b8d61 100644 | |
--- a/src/Stack/Build.hs | |
+++ b/src/Stack/Build.hs | |
@@ -53,7 +53,7 @@ build :: M env m | |
=> (Set (Path Abs File) -> IO ()) -- ^ callback after discovering all local files | |
-> BuildOpts | |
-> m () | |
-build setLocalFiles bopts = do | |
+build setLocalFiles bopts = errorWhenUnsupported bopts $ do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Stack/Build.hs b/src/Stack/Build.hs | |
index bb535e4..9710840 100644 | |
--- a/src/Stack/Build.hs | |
+++ b/src/Stack/Build.hs | |
@@ -150,9 +150,8 @@ withLoadPackage menv inner = do | |
{ packageConfigEnableTests = False | |
, packageConfigEnableBenchmarks = False | |
, packageConfigFlags = flags | |
- , packageConfigGhcVersion = envConfigGhcVersion econfig | |
+ , packageConfigCompilerVersion = envConfigCompilerVersion econfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Stack/Build.hs b/src/Stack/Build.hs | |
index bb535e4..9710840 100644 | |
--- a/src/Stack/Build.hs | |
+++ b/src/Stack/Build.hs | |
@@ -150,9 +150,8 @@ withLoadPackage menv inner = do | |
{ packageConfigEnableTests = False | |
, packageConfigEnableBenchmarks = False | |
, packageConfigFlags = flags | |
- , packageConfigGhcVersion = envConfigGhcVersion econfig | |
+ , packageConfigCompilerVersion = envConfigCompilerVersion econfig |