I hereby claim:
- I am alpmestan on github.
- I am alpmestan (https://keybase.io/alpmestan) on keybase.
- I have a public key ASD90e7ZU64oz5bgOCJwgXqRtDML5sYiQk_FY0bxl3IyMwo
To claim this, I am signing this object:
type Flat api = Reassoc (Flatten api) | |
-- | Completely flattens an API type by applying a few simple transformations. | |
-- The goal is to end up with an aPI type where things like @a :> (b :<|> c)@ | |
-- are rewritten to @a :> b :<|> a :> c@, so as to have client with very simple | |
-- types, instead of "nested clients". | |
type family Flatten (api :: k) :: k where | |
Flatten ((a :: k) :> (b :<|> c)) = a :> Flatten b :<|> Flatten (a :> c) | |
Flatten ((a :<|> b) :> c) = a :> Flatten c :<|> (Flatten (b :> c)) | |
Flatten ((a :: k) :> b) = Redex b (Flatten b) a |
{ | |
packageOverrides = ps: rec { | |
haskell.compiler = ps.haskell.compiler // { | |
myghc = ps.haskell.compiler.ghcHEAD.overrideDerivation (p: { | |
src = fetchgit { | |
url = "git://git.haskell.org/ghc.git"; | |
rev = "commit hash here"; | |
sha256 = "sha that nix computes for this"; | |
}; | |
}); |
I hereby claim:
To claim this, I am signing this object:
cabal install styx | |
Warning: The package list for 'hackage.haskell.org' is 26 days old. | |
Run 'cabal update' to get the latest list of available packages. | |
Resolving dependencies... | |
Configuring conduit-1.2.11... | |
Building conduit-1.2.11... | |
Installed conduit-1.2.11 | |
Configuring yaml-0.8.23.3... | |
Building yaml-0.8.23.3... | |
Installed yaml-0.8.23.3 |
-- 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 |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE PolyKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import Data.Proxy | |
-- could probably use 'reflection' instead of my | |
-- hacky KnownXXX classes |
{-# 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 |
$ .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, |
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 |
{-# LANGUAGE CPP #-} | |
#define information data | |
information Dir = Up | Down |