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 GeneralizedNewtypeDeriving #-} | |
import Control.DeepSeq | |
import HLearn.Algebra | |
import HLearn.Models.Distributions | |
iBag = [1..5] ++ [1..5] ++ [5..10] | |
newtype IG = IG Int | |
deriving (Read,Show, Num) |
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 qualified Data.Text.Lazy as T | |
import qualified Data.Foldable as F | |
import Control.Monad (when) | |
import Control.Monad.Trans.Class | |
import qualified Control.Monad.Trans.Maybe as M | |
-- import Control.Monad.Morph | |
{- |
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
{- | File "tmp2" fails to close in this example | |
- ghci> runSafeT . runEffect $ readFile' "tmp" >-> writeFile' "tmp2" | |
- {tmp2 open} | |
- {tmp open} | |
- {tmp closed} | |
-} | |
{-# language RankNTypes #-} | |
{-# language NoMonomorphismRestriction #-} | |
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 RankNTypes #-} | |
-- {-# LANGUAGE NoMonomorphismRestriction #-} | |
-- {-# LANGUAGE DeriveDataTypeable #-} | |
-- {-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE IncoherentInstances #-} |
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.Proxy | |
import Control.Proxy.Trans.State | |
import Control.Proxy.Parse | |
import Control.Monad | |
coordinate = liftP . pull -- Could be more complex with needing its own buffer | |
-- type and failure mechanisms | |
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.Proxy | |
import Control.Proxy.Trans.State | |
import Control.Proxy.Parse | |
import Control.Monad | |
chunkLine' | |
:: (Monad m, Proxy p) => | |
() -> StateP [Char] p () (Maybe Char) a [Char] m () |
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
article | |
aside | |
blockquote | |
body | |
br | |
button | |
canvas | |
caption | |
col | |
colgroup |
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
ghc -fforce-recomp --make Main.hs -rtsopts -O2 |
line 20 of example.hs was:
setImportsQ [("Prelude", Nothing), ("Data.Map", Just "M")]
for this example it is:
setImportsQ [("Prelude", Nothing), ("Data.Map", Just "M"), ("Control.Proxy", Just "P")]
When run with runhaskell or compiled with ghc hint can not find the pipes package when it is install through nix.