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: haskell | |
dist: trusty | |
cache: | |
directories: | |
- $HOME/.cabal/packages | |
- $HOME/.cabal/store | |
- $HOME/.stack | |
- $TRAVIS_BUILD_DIR/.stack-work |
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
#!/usr/bin/env stack | |
-- stack --install-ghc runghc --resolver nightly-2018-08-17 -- -Wall -O2 | |
{-# LANGUAGE RoleAnnotations #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE DerivingVia #-} |
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
#!/usr/bin/env stack | |
-- stack --install-ghc runghc --resolver lts-11.9 --package backprop-0.2.2.0 --package numhask-prelude-0.0.4.1 --package numhask-0.2.1.0 -- -Wall -O2 | |
{-# LANGUAGE NoImplicitPrelude #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FlexibleInstances #-} |
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 DataKinds #-} | |
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE NoImplicitPrelude #-} |
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 DataKinds, PolyKinds, ScopedTypeVariables, UndecidableInstances, | |
FlexibleInstances, FlexibleContexts, GADTs, TypeFamilies, RankNTypes, | |
LambdaCase, TypeOperators, ConstraintKinds #-} | |
import GHC.TypeLits | |
import Data.Proxy | |
import Data.Singletons.Prelude | |
import Data.Singletons.Decide | |
import Data.Constraint |
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 RankNTypes #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module Pipes.Getter 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 OverloadedStrings #-} | |
{-# LANGUAGE RankNTypes #-} | |
module TestMVC where | |
import Control.Category hiding ((.),id) | |
import qualified MVC.Prelude as MVC | |
import MVC | |
import qualified Pipes.Prelude as Pipes | |
import Control.Applicative |
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
vcStd :: Managed (View C.ByteString, Controller C.ByteString) | |
vcStd = ((,) <$> pure (contramap show MVC.stdoutLines) <*> fmap C.pack <$> MVC.stdinLines) |
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
tRemote :: Int -> IO () | |
tRemote n = do | |
backend0 <- initializeBackend host portSlave rtable | |
node0 <- newLocalNode backend0 | |
backend <- initializeBackend host portMaster rtable | |
node <- newLocalNode backend | |
Node.runProcess node (remotePipe' n (Node.localNodeId node0)) | |
where | |
rtable :: RemoteTable | |
rtable = __remoteTable initRemoteTable |
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 DeriveGeneric #-} | |
{-# LANGUAGE DefaultSignatures #-} | |
import GHC.Generics | |
import Control.Applicative | |
import Data.Text.Encoding | |
import Data.Aeson | |
import Data.Aeson.Types | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Lazy as LB |
NewerOlder