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 OverlappingInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
module VogtNoApplyAB where | |
import Control.Applicative | |
class InfixF a b 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 TemplateHaskell #-} | |
module MJ where | |
import Language.Haskell.TH | |
x = False | |
xE = varE (mkName "x") -- dyn "x" | |
xE' = varE 'x | |
{- | | |
>>> :set -XTemplateHaskell |
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 FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE DataKinds #-} | |
module TT where | |
import Control.Lens | |
data Thunk a = Thunk a deriving Show |
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 ScopedTypeVariables #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE TemplateHaskell #-} |
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 FlexibleContexts #-} | |
{-# LANGUAGE IncoherentInstances #-} | |
{-# LANGUAGE OverlappingInstances #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
module Olaf 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 FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
module ForwardVector where | |
import Numeric.AD.Internal.Forward.Double | |
import Numeric.AD.Mode | |
import Numeric.AD.Internal.Identity |
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 KindSignatures #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import qualified Data.Vector as V | |
import qualified Data.Vector.Mutable as VM | |
import qualified Data.Vector.Generic as G | |
import Data.Coerce | |
import Control.Monad.Primitive | |
import Foreign.C | |
data family MVec (v :: * -> *) :: * -> * -> * |
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 NoMonomorphismRestriction #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Nikolay where | |
import Control.Lens | |
-- superclass constraint here says that TtseT is the inverse to TestT, | |
-- without it, the example attached to test2 fails, since otherwise we | |
-- could be allowed to add a | |
-- | |
-- type TestT Double = Char, | |
-- |
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
----------------------------------------------------------------------------- | |
-- | | |
-- Module : XMonad.Actions.FocusNth | |
-- Copyright : (c) Karsten Schoelzel <[email protected]> | |
-- License : BSD | |
-- | |
-- Maintainer : Karsten Schoelzel <[email protected]> | |
-- Stability : stable | |
-- Portability : unportable | |
-- |
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 PolyKinds #-} | |
{-# LANGUAGE DataKinds, FlexibleContexts, TemplateHaskell, TypeFamilies, TypeOperators #-} | |
import Data.Extensible | |
import Data.Monoid | |
import Control.Monad.Identity | |
mkField "a b" | |
nilR :: Comp First (Field Identity) :* '[] | |
nilR = Nil |