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
myjson :: Maybe Int | |
myjson = do | |
json <- decode $ "{\"key\":5}" | |
flip parseMaybe json $ \obj -> | |
(+) <$> obj .: "key" <*> obj .: "key" | |
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
object comonadbuilder { | |
import scalaz._ | |
import Scalaz._ | |
case class Config(a: Option[String] = None, b: Option[Int] = None) | |
type Builder[A] = Config => A | |
def setFieldA(a: String) = (b:Builder[Config]) => b(Config(a=Some(a))) | |
//> setFieldA: (a: String)(comonadbuilder.Config => comonadbuilder.Config) => co | |
//| monadbuilder.Config |
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
importantsetting = Cloudbees.env do | |
test "somestuff" | |
staging "someotherstuff" | |
production "realstuff" | |
end |
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
private static class RequestImpl implements Request { | |
private final String uri; | |
public RequestImpl(String uri) { | |
this.uri = uri; | |
} | |
@Override | |
public String getRequestURI() { |
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
Application.hs:49:44: | |
No instance for (Control.Monad.Logger.MonadLogger IO) | |
arising from a use of `runMigration' | |
Possible fix: | |
add an instance declaration for | |
(Control.Monad.Logger.MonadLogger IO) | |
In the second argument of `Database.Persist.Store.runPool', namely | |
`(runMigration migrateAll)' | |
In a stmt of a 'do' block: | |
Database.Persist.Store.runPool dbconf (runMigration migrateAll) p |
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
16:49 ~/haskell/yesog $ ghc-pkg list monad-logger | |
/Library/Frameworks/GHC.framework/Versions/7.4.1-x86_64/usr/lib/ghc-7.4.1/package.conf.d | |
/Users/ivan/.ghc/x86_64-darwin-7.4.1/package.conf.d | |
monad-logger-0.2.3.2 |
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
[5 of 8] Compiling Foundation ( Foundation.hs, dist/build/Foundation.o ) | |
[6 of 8] Compiling Import ( Import.hs, dist/build/Import.o ) | |
[7 of 8] Compiling Handler.Home ( Handler/Home.hs, dist/build/Handler/Home.o ) | |
[8 of 8] Compiling Application ( Application.hs, dist/build/Application.o ) | |
Application.hs:49:44: | |
No instance for (monad-logger-0.3.0:Control.Monad.Logger.MonadLogger | |
IO) | |
arising from a use of `runMigration' | |
Possible fix: |
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
16:25 ~/haskell/unix-time $ sh configure --with-compiler=ghc --prefix=/Users/ivan/Library/Haskell/ghc-7.4.1/lib/unix-time-0.1.5 --with-gcc=/usr/bin/gcc | |
checking for gcc... gcc | |
checking whether the C compiler works... yes | |
checking for C compiler default output file name... a.out | |
checking for suffix of executables... | |
checking whether we are cross compiling... no | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes | |
checking whether gcc accepts -g... yes | |
checking for gcc option to accept ISO C89... none needed |
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
searching for ghc in path. | |
found ghc at /usr/bin/ghc | |
("/usr/bin/ghc",["--numeric-version"]) | |
/usr/bin/ghc is version 7.4.1 | |
looking for tool "ghc-pkg" near compiler in /usr/bin | |
found ghc-pkg in /usr/bin/ghc-pkg | |
("/usr/bin/ghc-pkg",["--version"]) | |
/usr/bin/ghc-pkg is version 7.4.1 | |
("/usr/bin/ghc",["--supported-languages"]) | |
("/usr/bin/ghc",["--info"]) |
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
16:06 ~/haskell/yesog $ cabal install unix-time | |
Resolving dependencies... | |
Configuring unix-time-0.1.5... | |
Failed to install unix-time-0.1.5 | |
cabal: Error: some packages failed to install: | |
unix-time-0.1.5 failed during the configure step. The exception was: | |
ExitFailure 127 |