This file contains hidden or 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 CPP #-} | |
#define information data | |
information Dir = Up | Down |
This file contains hidden or 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 qualified Data.Array.Accelerate as A | |
import qualified Data.Array.Accelerate.CUDA as A | |
-- (v1 `outer` v2) . (v1 - v2) | |
h :: A.Vector Double -> A.Vector Double -> A.Vector Double | |
h v1 v2 = A.run $ accOuter v1' v2' `accApply` A.zipWith (-) v1' v2' | |
where !v1' = A.use v1 | |
!v2' = A.use v2 | |
-- outer product |
This file contains hidden or 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
$ .cabal-sandbox/bin/accelerate-blas-test | |
Bus error: 10 | |
$ .cabal-sandbox/bin/accelerate-blas-test +RTS -xc | |
*** Exception (reporting due to +RTS -xc): (THUNK_1_0), stack trace: | |
Data.Array.Accelerate.CUDA.Persistent.new, | |
called from Data.Array.Accelerate.CUDA.State.theState, | |
called from Data.Array.Accelerate.CUDA.State.CAF | |
*** Exception (reporting due to +RTS -xc): (THUNK_1_0), stack trace: | |
Data.Array.Accelerate.CUDA.Persistent.new, | |
called from Data.Array.Accelerate.CUDA.State.theState, |
This file contains hidden or 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
$ git diff | |
diff --git a/src/Text/Taggy/Parser.hs b/src/Text/Taggy/Parser.hs | |
index e7dc2cc..19b49e1 100644 | |
--- a/src/Text/Taggy/Parser.hs | |
+++ b/src/Text/Taggy/Parser.hs | |
@@ -117,7 +117,7 @@ tagclose = do | |
char '/' | |
skipSpace | |
i <- ident | |
- char '>' |
This file contains hidden or 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
module Data.JSON.FromJSON where | |
import Control.Applicative | |
import Data.ByteString | |
import Data.JSON.Stream | |
newtype Parse a = | |
Parse { runParse :: [Event] -> Maybe a } | |
boo :: Parse a |
This file contains hidden or 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
-- | |
type CRUD (resourceName :: Symbol) i a = | |
resourceName :> Get [a] -- optional: list all | |
:<|> resourceName :> ReqBody a :> Post a -- create | |
:<|> resourceName :> Capture "id" i :> Get a -- read | |
:<|> resourceName :> Capture "id" i :> ReqBody a :> Put a -- update | |
:<|> resourceName :> Capture "id" i :> Delete -- delete |
This file contains hidden or 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
checking OpenSSL header version... 100010bf (OpenSSL 1.0.1k 8 Jan 2015) | |
checking OpenSSL library version... 100010af (OpenSSL 1.0.1j 15 Oct 2014) | |
checking whether OpenSSL's headers match the library... no | |
configure: error: Your OpenSSL headers do not match your | |
library. Check config.log for details. | |
If you are sure your installation is consistent, you can disable the check | |
by running "./configure --without-openssl-header-check". | |
Also see contrib/findssl.sh for help identifying header/library mismatches. | |
builder for ‘/nix/store/qx4hpp9h9zk0cqldkv51avc9hwg6l4n5-openssh-6.7p1.drv’ failed with exit code 1 |
This file contains hidden or 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 DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
module Files where | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.Either |
This file contains hidden or 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 DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import Data.Proxy | |
-- could probably use 'reflection' instead of my | |
-- hacky KnownXXX classes |
This file contains hidden or 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
-- similar to https://ghc.haskell.org/trac/ghc/ticket/12468 | |
-- except that I'm trying with 8.2.1 | |
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help | |
Prelude> :set -XGADTs | |
Prelude> data Foo a where Foo :: Int -> Foo Bool | |
Prelude> f :: Foo a -> a ; f (Foo n) = _k n | |
<interactive>:3:31: error: | |
• Found hole: _k :: Int -> a |
OlderNewer