Skip to content

Instantly share code, notes, and snippets.

Avatar
🦉
Someone here is possessed by an owl. Who?

Oleg Grenrus phadej

🦉
Someone here is possessed by an owl. Who?
View GitHub Profile
View TrueFalse.agda
{-# OPTIONS --cubical --safe #-}
module TrueFalse where
open import Cubical.Foundations.Everything
open import Cubical.Data.Bool
-- The following is basic stuff
true≡true : true ≡ true
true≡true = refl
View rc4-try2.md
curl -O https://raw.githubusercontent.com/haskell/cabal/725ca482d869e03be66bc845b39662ec0609bd99/release.py
curl -O http://oleg.fi/cabal-install-3.4.0.0-rc4/Cabal-3.4.0.0.tar.gz
curl -O http://oleg.fi/cabal-install-3.4.0.0-rc4/cabal-install-3.4.0.0.tar.gz
cat > SHA256SUMS <<EOF
47f95c62b6ec25900ff391fccdbcb46dd87efca6a83d8e80d7834a2cee9158bc  release.py
a1e9d803bf99c4989c82d63f6ae619740ece0282987dd3c8bae2fe158b85ed4c  Cabal-3.4.0.0.tar.gz
0499406c277bcaa431a0666d3e5ea171ee5bd7d66e6cf48ff275452d0723bb8b  cabal-install-3.4.0.0.tar.gz
EOF
sha256sum -c SHA256SUMS
View no-empty-paths.diff
diff --git a/Cabal/src/Distribution/FieldGrammar/Newtypes.hs b/Cabal/src/Distribution/FieldGrammar/Newtypes.hs
index 3f37b43eb..35a1e781c 100644
--- a/Cabal/src/Distribution/FieldGrammar/Newtypes.hs
+++ b/Cabal/src/Distribution/FieldGrammar/Newtypes.hs
@@ -250,7 +250,11 @@ newtype FilePathNT = FilePathNT { getFilePathNT :: String }
instance Newtype String FilePathNT
instance Parsec FilePathNT where
- parsec = pack <$> parsecToken
+ parsec = do
View aaa-transformers-quantified-constraints.patch
diff --git a/Control/Monad/Trans/Class.hs b/Control/Monad/Trans/Class.hs
index b92bc0e..d6028dc 100644
--- a/Control/Monad/Trans/Class.hs
+++ b/Control/Monad/Trans/Class.hs
@@ -5,6 +5,7 @@
#if __GLASGOW_HASKELL__ >= 710
{-# LANGUAGE AutoDeriveTypeable #-}
#endif
+{-# LANGUAGE QuantifiedConstraints #-}
-----------------------------------------------------------------------------
View ParanoidRead.hs
import Data.Typeable (Typeable, typeRep)
import Data.Proxy (Proxy (..))
import Text.Read (readMaybe)
import GHC.Stack (HasCallStack)
import Prelude hiding (read)
read :: forall a. (Typeable a, Read a, HasCallStack) => String -> a
read s = case readMaybe s of
Just x -> x
View DeriveFunctorMeh.hs
{-# LANGUAGE DeriveFunctor #-}
-- This are are fine
newtype F a = F ((a -> Bool) -> Bool) deriving Functor
newtype T a = T (a,a,a) deriving Functor
-- but if we define
newtype Fun a b = Fun (a -> b) -- and
data Tri a b c = Tri a b c
View TraverseSources.hs
module Main (main) where
import System.FilePath.Glob (glob)
import Control.Monad (foldM)
import Distribution.Simple.Utils (fromUTF8BS)
import qualified Data.ByteString as BS
import qualified Data.Map.Strict as Map
import GHC.Hs.Expr
View gist:a90def69efaa7223a782b6b8eebe3427
[polinukli] ~ % ghc-pkg list --package-db=/cabal/store/ghc-8.6.5/package.db|grep hashable
hashable-1.2.7.0
hashable-1.2.7.0
hashable-1.2.7.0
hashable-1.2.7.0
hashable-1.2.7.0
hashable-1.2.7.0
hashable-1.2.7.0
hashable-1.2.7.0
hashable-1.2.7.0
View a.md

First build:

% cabal v2-build -w ghc-8.8.3

(I tried at v2.6 tag)

Then run test

View bar-Bar.hs
{-# LANGUAGE TemplateHaskell #-}
module Bar where
import System.Process (readProcess)
import Control.Monad.IO.Class (liftIO)
import Language.Haskell.TH.Syntax (lift)
fooBar :: String
fooBar = $(liftIO (readProcess "foo" [] "") >>= lift)
You can’t perform that action at this time.