code
stringlengths
2
1.05M
repo_name
stringlengths
5
101
path
stringlengths
4
991
language
stringclasses
3 values
license
stringclasses
5 values
size
int64
2
1.05M
{-# LANGUAGE TupleSections, OverloadedStrings, NoImplicitPrelude #-} module ParseEmail ( parseEmail , flatten , getAttachments , getPart , subject , Email(..) ) where import ClassyPrelude hiding (try, (<|>)) import Prelude (tail) import Text.ParserCombinators.Parsec (parse, manyTill, anyChar, try, stri...
MattWis/smallEmail
smallEmail/ParseEmail.hs
Haskell
mit
4,544
{-# LANGUAGE OverloadedStrings #-} module Console.GitHubStats.StatsSpec where import Test.Hspec import Console.GitHubStats.Stats import Console.GitHubStats.Types spec :: Spec spec = describe "mkHistogram" $ do it "sorts languages in ascending order" $ do let repos = ...
acamino/ghs
test/Console/GitHubStats/StatsSpec.hs
Haskell
mit
1,118
module Core.LambdaLift.MFE ( identifyMFE ) where import Common import Core.AST import Core.AnnotAST import Core.Prelude identifyMFE :: AnnotProgram Int (Annot Int Name) -> Program (Annot Int Name) identifyMFE = Program . map identifySC . getProgramF where identifySC (SupercombF name [] body) = Supercomb name [] bo...
meimisaki/Rin
src/Core/LambdaLift/MFE.hs
Haskell
mit
1,669
module Ternary.Performance ( performanceTest, evalPerformance) where import System.TimeIt import Ternary.Core.Digit (T2(..)) import Ternary.Util.Misc (forceElements, forceElementsIO) import Ternary.List.Exact import Ternary.List.ExactNum () import Ternary.Compiler.ArrayLookup (warmup) import Ternary.Sampling.Expres...
jeroennoels/exact-real
test/Ternary/Performance.hs
Haskell
mit
1,887
-- | <https://tools.ietf.org/html/rfc4511#section-4.11 Abandon> operation. -- -- This operation comes in two flavours: -- -- * asynchronous, 'IO' based ('abandonAsync') -- -- * asynchronous, 'STM' based ('abandonAsyncSTM') -- -- Of those, the first one ('abandonAsync') is probably the most useful for the typical us...
VictorDenisov/ldap-client
src/Ldap/Client/Abandon.hs
Haskell
bsd-2-clause
1,166
{-# LANGUAGE TemplateHaskell, KindSignatures, TypeFamilies, FlexibleContexts, GADTs #-} module Model where import Prelude import Yesod import Data.Text (Text) import Database.Persist.Quasi import Database.Persist.MongoDB import Language.Haskell.TH.Syntax -- You can define all of your database entities in the entities...
cutsea110/blog
Model.hs
Haskell
bsd-2-clause
601
module Stats (nintyFifth, Estimate(..)) where import qualified Data.Vector.Unboxed as U import Statistics.Sample (mean) import Statistics.Resampling (resample, fromResample) import Statistics.Resampling.Bootstrap (bootstrapBCA, Estimate(..) ) import System.Random.MWC (create) nintyFifth :: [Double] -> IO Estimate ni...
ku-fpg/ldpc
src/Stats.hs
Haskell
bsd-2-clause
647
module ImplicitRefs.Evaluator ( valueOf , run , eval , evalProgram ) where import Control.Applicative ((<|>)) import Control.Arrow (second) import Control.Monad.Except import ImplicitRefs.Data import ImplicitRefs.Parser type EvaluateResult = IOTry ExpressedVal...
li-zhirui/EoplLangs
src/ImplicitRefs/Evaluator.hs
Haskell
bsd-3-clause
9,909
module Main where import Text.Regex.Posix ((=~)) import System.Environment (getArgs) myGrep :: String -> String -> IO () myGrep regex filename = do fileSlurp <- readFile filename mapM_ putStrLn $ filter (=~ regex) (lines fileSlurp) main :: IO () main = do (myRegex:filenames) <- getArgs mapM_ (myGrep myRe...
mrordinaire/data-analysis
app/hgrep.hs
Haskell
bsd-3-clause
335
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Control.THEff import Control.THEff.Fresh mkEff "UnicalChar" ''Fresh ''Char ''NoEff main:: IO () main = putStrLn $ runUnicalChar 'A' $ do ...
KolodeznyDiver/THEff
samples/SampleFresh.hs
Haskell
bsd-3-clause
412
{-| Module : Types.BooleanLogic Description : Some type families on the kind Bool. Copyright : (c) Alexander Vieth, 2015 Licence : BSD3 Maintainer : aovieth@gmail.com Stability : experimental Portability : non-portable (GHC only) -} {-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE TypeFamilies #-} {-# LA...
avieth/Relational
Types/BooleanLogic.hs
Haskell
bsd-3-clause
998
{-# Language DataKinds, OverloadedStrings #-} {-# Language RankNTypes, TypeOperators #-} {-# Language PatternSynonyms #-} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE GADTs #-} module SAWScript.X86 ( Options(..) , proof , proofWithOptions , linuxInfo , bsdInfo , Fun(..) , Goal(..) , gGoal , getGoals ...
GaloisInc/saw-script
src/SAWScript/X86.hs
Haskell
bsd-3-clause
22,551
{-# LANGUAGE OverloadedStrings #-} module Advent.Day11 where import qualified Data.Char as C import qualified Data.List as L increment :: String -> String increment str = reverse (increment' (reverse str)) where increment' ('z':rest) = 'a' : increment' rest increment' (c:rest) = nextChar c : rest ...
micxjo/hs-advent
src/Advent/Day11.hs
Haskell
bsd-3-clause
1,061
{-# language CPP #-} -- No documentation found for Chapter "CommandBufferResetFlagBits" module Vulkan.Core10.Enums.CommandBufferResetFlagBits ( CommandBufferResetFlags , CommandBufferResetFlagBits( COMMAND_BUFFER_RESET_RELEASE_RESOURCES_BIT ...
expipiplus1/vulkan
src/Vulkan/Core10/Enums/CommandBufferResetFlagBits.hs
Haskell
bsd-3-clause
2,983
{-# LANGUAGE CPP #-} module TcFlatten( FlattenEnv(..), FlattenMode(..), mkFlattenEnv, flatten, flattenMany, flatten_many, flattenFamApp, flattenTyVarOuter, unflatten, eqCanRewrite, eqCanRewriteFR, canRewriteOrSame, CtFlavourRole, ctEvFlavourRole, ctFlavourRole ) where #include "HsVersions.h" impor...
bitemyapp/ghc
compiler/typecheck/TcFlatten.hs
Haskell
bsd-3-clause
57,104
{-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE TypeFamilies #-} module Wavecore.ECDIS.SeaMap where import Control.Applicative import Data.Geo.TransverseMercator import Data.Geo.UTM import Data.Maybe import FRP.Sodium import ...
wavecorenautic/ecdis-client
src/Wavecore/ECDIS/SeaMap.hs
Haskell
bsd-3-clause
9,216
{- (c) Galois, 2006 (c) University of Glasgow, 2007 -} {-# LANGUAGE CPP, NondecreasingIndentation, RecordWildCards #-} module Coverage (addTicksToBinds, hpcInitCode) where #ifdef GHCI import qualified GHCi import GHCi.RemoteTypes import Data.Array import ByteCodeTypes import GHC.Stack.CCS #endif import Type import H...
nushio3/ghc
compiler/deSugar/Coverage.hs
Haskell
bsd-3-clause
51,902
module Main where import Types import RegexPattern import System.Environment import Data.String import Text.Regex.Posix import qualified Data.Text as T (splitOn, unpack) import Data.Maybe import System.IO import qualified System.IO as S import ...
frankhucek/Todo
app/Main.hs
Haskell
bsd-3-clause
2,999
{-# LANGUAGE NoImplicitPrelude , ScopedTypeVariables , UnicodeSyntax #-} module System.FTDI.Utils.Properties where -- base import Control.Monad ( (>>) ) import Data.Bool ( otherwise ) import Data.Function ( ($) ) import Data.Ord ( Ord ) import Prelude ( Integral, RealFrac, Fract...
roelvandijk/ftdi
System/FTDI/Utils/Properties.hs
Haskell
bsd-3-clause
2,166
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module PrettyPrint where import Data.Function ((&)) import Data.Monoid ((<>)) import Data.String.Here import Data.Text (Text) import qualified Data.Text as T import Hexon impor...
tchoutri/Hexon
src/PrettyPrint.hs
Haskell
bsd-3-clause
1,934
module Wallet.Inductive ( -- * Wallet events WalletEvent(..) , walletEventIsRollback -- * Inductive wallets , Inductive(..) , uptoFirstRollback , inductiveInit ) where import Universum import qualified Data.List as List import qualified Data.Set as Set import Formatting (bpri...
input-output-hk/pos-haskell-prototype
wallet/test/unit/Wallet/Inductive.hs
Haskell
mit
2,930
{-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Chronological sequences. module Test.Pos.Core.Chrono ( ) where import Pos.Core.Chrono import Test.QuickCheck (Arbitrary) deriving instance Arbitrary (f a) => Arbitrar...
input-output-hk/pos-haskell-prototype
core/test/Test/Pos/Core/Chrono.hs
Haskell
mit
405
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="hu-HU"> <title>AdvFuzzer Add-On</title> <maps> <homeID>top</homeID> <mapref location="...
veggiespam/zap-extensions
addOns/fuzz/src/main/javahelp/org/zaproxy/zap/extension/fuzz/resources/help_hu_HU/helpset_hu_HU.hs
Haskell
apache-2.0
964
module Test.Invariant where import Test.QuickCheck infix 1 &> infix 2 <~~, @~>, <?>, <=> -- | Defines extensional equality. This allows concise, point-free, -- definitions of laws. -- -- > f(x) == g(x) -- > f <=> g (<=>) :: Eq b => (a -> b) -> (a -> b) -> a -> Bool (f <=> g) x = f x == g x -- | Pointfree version o...
knupfer/test-invariant
src/Test/Invariant.hs
Haskell
bsd-3-clause
8,090
{-# LANGUAGE IncoherentInstances #-} {-# OPTIONS_GHC -fno-warn-incomplete-patterns #-} -- | This module provides a category transformer for automatic differentiation. -- -- There are many alternative notions of a generalized derivative. -- Perhaps the most common is the differential Ring. -- In Haskell, this might be d...
Drezil/subhask
src/SubHask/Category/Trans/Derivative.hs
Haskell
bsd-3-clause
6,414
-- | When there aren't enough registers to hold all the vregs we have to spill some of those -- vregs to slots on the stack. This module is used modify the code to use those slots. -- module RegAlloc.Graph.Spill ( regSpill, SpillStats(..), accSpillSL ) where import RegAlloc.Liveness import In...
mcmaniac/ghc
compiler/nativeGen/RegAlloc/Graph/Spill.hs
Haskell
bsd-3-clause
12,564
{-# LANGUAGE TypeFamilies, FlexibleInstances, ConstraintKinds, DeriveGeneric, DefaultSignatures #-} module BayesStack.DirMulti ( -- * Dirichlet/multinomial pair Multinom, dirMulti, symDirMulti, multinom -- | Do not do record updates with these ...
beni55/bayes-stack
BayesStack/DirMulti.hs
Haskell
bsd-3-clause
10,404
----------------------------------------------------------------------------- -- | -- Module : XMonad.Util.DebugWindow -- Copyright : (c) Brandon S Allbery KF8NH, 2014 -- License : BSD3-style (see LICENSE) -- -- Maintainer : allbery.b@gmail.com -- Stability : unstable -- Portability : not portable -...
f1u77y/xmonad-contrib
XMonad/Util/DebugWindow.hs
Haskell
bsd-3-clause
7,208
-- Copyright (c) 2014 Eric McCorkle. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: -- -- 1. Redistributions of source code must retain the above copyright -- notice, this list of conditi...
emc2/compiler-misc
test/Tests/Control/Monad.hs
Haskell
bsd-3-clause
1,732
-- | -- Module : Foundation.VFS.FilePath -- License : BSD-style -- Maintainer : foundation -- Stability : experimental -- Portability : portable -- -- # Opaque implementation for FilePath -- -- The underlying type of a FilePath is a `Foundation.ByteArray`. It is indeed like -- this because for some systems ...
vincenthz/hs-foundation
foundation/Foundation/VFS/FilePath.hs
Haskell
bsd-3-clause
8,201
{-# LANGUAGE RecordWildCards, ViewPatterns #-} module Development.Bake.Pretty(ovenPretty, ovenPrettyMerge, Pretty(..)) where import Development.Bake.Core.Type import Data.List.Extra data Pretty a = Pretty String a deriving (Read,Show,Eq) instance Stringy a => Stringy (Pretty a) where stringyTo (Pretty a b) = a...
Pitometsu/bake
src/Development/Bake/Pretty.hs
Haskell
bsd-3-clause
1,502
{-# LANGUAGE TupleSections, OverloadedStrings #-} module Handler.Home where import Import as I import Data.Time import Data.List as I (isPrefixOf) import Text.Blaze.Html (preEscapedToHtml) import Text.Blaze.Html.Renderer.String (renderHtml) import Yesod.Auth (requireAuthId) import Yesod.Auth.HashDB (setSaltAndPassword...
kobayashi1027/nomnichi-haskell
Handler/Home.hs
Haskell
bsd-2-clause
4,641
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="ko-KR"> <title>Encode/Decode/Hash Add-on</title> <maps> <homeID>encoder</homeID> <mapre...
thc202/zap-extensions
addOns/encoder/src/main/javahelp/org/zaproxy/addon/encoder/resources/help_ko_KR/helpset_ko_KR.hs
Haskell
apache-2.0
974
{- (c) The University of Glasgow 2006 (c) The AQUA Project, Glasgow University, 1994-1998 \section[UniqSet]{Specialised sets, for things with @Uniques@} Based on @UniqFMs@ (as you would expect). Basically, the things need to be in class @Uniquable@. -} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE DeriveD...
shlevy/ghc
compiler/utils/UniqSet.hs
Haskell
bsd-3-clause
6,618
{-# OPTIONS_GHC -Wall #-} {-# Language TypeFamilies #-} {-# Language DeriveGeneric #-} module T8479 where import GHC.Generics import Data.Kind (Type) class Blah (a :: Type -> Type) where type F a :: Type -> Type data Foo (f :: Type -> Type) a = MkFoo ((F f) a) deriving Generic1
sdiehl/ghc
testsuite/tests/generics/T8479.hs
Haskell
bsd-3-clause
285
{-# LANGUAGE DeriveDataTypeable #-} ---------------------------------------------------------------------- -- | -- Module : XMonad.Actions.GroupNavigation -- Copyright : (c) nzeh@cs.dal.ca -- License : BSD3-style (see LICENSE) -- -- Maintainer : nzeh@cs.dal.ca -- Stability : unstable -- Portability : unp...
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Actions/GroupNavigation.hs
Haskell
bsd-2-clause
8,762
module Distribution.Client.Dependency.Modular.Index where import Data.List as L import Data.Map as M import Prelude hiding (pi) import Distribution.Client.Dependency.Modular.Dependency import Distribution.Client.Dependency.Modular.Flag import Distribution.Client.Dependency.Modular.Package import Distribution.Client.D...
DavidAlphaFox/ghc
libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/Index.hs
Haskell
bsd-3-clause
1,304
module Test13 where f ((x : xs)) = x : xs g = f (1 : [1, 2])
kmate/HaRe
old/testing/refacFunDef/Test13_AstOut.hs
Haskell
bsd-3-clause
64
-- |Simple vectorised constructors and projections. -- module Vectorise.Vect ( Vect, VVar, VExpr, VBind , vectorised , lifted , mapVect , vVarType , vNonRec , vRec , vVar , vType , vTick , vLet , vLams , vVarApps , vCaseDEFAULT ) where import CoreSyn import Type ( Type ) impor...
oldmanmike/ghc
compiler/vectorise/Vectorise/Vect.hs
Haskell
bsd-3-clause
2,935
{-# LANGUAGE CPP #-} module X86.RegInfo ( mkVirtualReg, regDotColor ) where #include "nativeGen/NCG.h" #include "HsVersions.h" import Size import Reg import Outputable import Platform import Unique import UniqFM import X86.Regs mkVirtualReg :: Unique -> Size -> VirtualReg mkVirtualReg u size =...
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/RegInfo.hs
Haskell
bsd-3-clause
1,869
{-# OPTIONS_GHC -fno-warn-redundant-constraints #-} {-# LANGUAGE FlexibleInstances #-} {- With "hugs -98 +o test.hs" gives me: ERROR "test.hs":8 - Cannot justify constraints in instance member binding *** Expression : fromStr *** Type : FromStr [a] => String -> [a] *** Given context : From...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc176.hs
Haskell
bsd-3-clause
1,272
{-# LANGUAGE ExistentialQuantification, TemplateHaskell #-} module Light.Primitive ( Primitive, primitive, primitiveShape, primitiveMaterial , Material(..) ) where import Light.Shape import Light.Geometry.Transform data Material = Material deriving (Eq, Show, Read) data Primitive = Primitive { primitiveShape ...
jtdubs/Light
src/Light/Primitive.hs
Haskell
mit
908
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.DelayNode (js_getDelayTime, getDelayTime, DelayNode, castToDelayNode, gTypeDelayNode) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromInteg...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/DelayNode.hs
Haskell
mit
1,351
-------------------------------------------------------------------------------- -- | -- | Module : Data -- | Copyright : (c) Vladimir Lopatin 2014 -- | License : BSD3 -- | -- | Maintainer : Vladimir Lopatin <madjestic13@gmail.com> -- | Stability : experimental -- | Portability : untested -- | -- | ...
ublubu/zombieapaperclypse
NGL/Shape.hs
Haskell
mit
3,609
{-# LANGUAGE OverloadedStrings #-} -- | This module provides functionality to manipulate raw transaction. It -- automatically interprets transactions using the `bitcoin-tx` package, so -- you can work with actual 'Btc.Transaction' objects rather than their -- serialized format. module Network.Bitcoin.Api.Transa...
solatis/haskell-bitcoin-api
src/Network/Bitcoin/Api/Transaction.hs
Haskell
mit
5,718
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE NoMonomorphismRestriction #-} import Control.Lens import Control.Lens.TH data Record1 a = Record1 { _a :: Int , _b :: Maybe a } deriving Show data Record2 = Record2 { _c :: String , _d :: [Int] } deriving Show $(makeLenses ''Record1) $(makeLenses ''Record2) ...
riwsky/wiwinwlh
src/lens.hs
Haskell
mit
1,357
module Euler.Problems.Euler012 ( euler012 ) where import Data.List (group) import Euler.Primes (primeFactors) euler012 :: () -> Int euler012 _ = fromIntegral $ head $ dropWhile ((<501) . divisors) $ drop 1 triangles where triangles = 1 : zipWith (+) triangles [2..] divisors = product . map ((+...
b52/projecteuler
src/Euler/Problems/Euler012.hs
Haskell
mit
357
main = do line <- getLine if null line then return () else do putStrLn $ reverseWords line main reverseWords :: String -> String reverseWords = unwords . map reverse . words
fabriceleal/learn-you-a-haskell
09/infinite_input.hs
Haskell
mit
228
module Util.Util where import Graphics.Rendering.OpenGL -- |'fib' returns given Fibonacci number fib :: Int -> Int fib = (!!) fibs -- |'fibs' is a list of Fibonacci numbers fibs :: [Int] fibs = 0 : 1 : zipWith (+) fibs (tail fibs) cube w = renderPrimitive Quads $ do vertex $ Vertex3 w w w vertex $ Vertex...
andrey013/mynd
src/Util/Util.hs
Haskell
mit
1,595
module Rebase.Data.Profunctor.Adjunction ( module Data.Profunctor.Adjunction ) where import Data.Profunctor.Adjunction
nikita-volkov/rebase
library/Rebase/Data/Profunctor/Adjunction.hs
Haskell
mit
122
{-# LANGUAGE RecordWildCards, DeriveGeneric #-} module Exp where import GHC.Generics import Language.Haskell.Exts.Annotated -- import Control.Monad import Control.Applicative import Control.Arrow import Text.PrettyPrint.GenericPretty import Data.List import Data.Char import Data.Maybe import Control.Conditional impo...
HanStolpo/ghc-edit
test/Exp.hs
Haskell
mit
19,543
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} -- | Export the data source to various data formats. module DataAnalysis.Application.Handler.Export where import Blaze.ByteString.Builder -- import Data.Conduit import qualified Data.Conduit.List as C...
teuffy/min-var-ci
src/DataAnalysis/Application/Handler/Export.hs
Haskell
mit
4,762
{-# LANGUAGE RecordWildCards, ParallelListComp #-} module Exec where import Data.Char import Data.List import Debug.Trace import TypesEtc import Sprockell -- ============================================================================================ -- execution functions for simulation purposes: exec, sim -- --...
Oboema/FP-GO1
Exec.hs
Haskell
mit
6,509
module Network.Server ( module Network.Server.Common ) where import Network.Server.Common
harrisi/on-being-better
list-expansion/Haskell/course/projects/NetworkServer/haskell/src/Network/Server.hs
Haskell
cc0-1.0
94
{-# LANGUAGE OverloadedStrings, CPP #-} module Model.ActionKey where import qualified Data.ByteString.Builder as BS import qualified Data.ByteString.Char8 as BS import qualified Database.PostgreSQL.Simple.FromRow as PG import qualified Database.PostgreSQL.Simple.FromField as PG import qualified Database.PostgreSQL.Si...
DataStewardshipPortal/ds-wizard
Model/ActionKey.hs
Haskell
apache-2.0
1,229
module Main where import Control.Lens import Control.Monad import Data.Bits import qualified Data.ByteString.Lazy.Char8 as BL import Data.Bytes.Get import Data.List (intercalate) import System.Ext2 import System.Environment main :: IO () main = do args <- getArgs when (length args /= 1) $ error "Usage: ext2ch...
relrod/ext2
src/ext2checker.hs
Haskell
bsd-2-clause
1,244
module Graphics.GL.Low.Classes where import Graphics.GL -- | OpenGL internal image formats. class InternalFormat a where internalFormat :: (Eq b, Num b) => proxy a -> b -- | The allowed attachment point for images with an internal format. class InternalFormat a => Attachable a where attachPoint :: (Eq b, Num b) ...
sgraf812/lowgl
Graphics/GL/Low/Classes.hs
Haskell
bsd-2-clause
944
-- | Collection of utilities to make @wybor@ customization palatable -- -- Those are mostly thin wrappers over things in "System.Console.ANSI" from @ansi-terminal@ module Ansi ( reset , bold , regular , underlining , swap , unswap , fgcolor , bgcolor , Ansi.Underlining(..) , Ansi.ColorIntensity(..) ...
supki/wybor
src/Ansi.hs
Haskell
bsd-2-clause
1,402
{-# LANGUAGE FlexibleContexts #-} module Horbits.UI.Camera.Control (setupMouseControl) where import Control.Lens import Control.Monad.Trans.State import Data.IORef import Graphics.UI.Gtk import Linear import Horbits.Data.Binding import Horbits.UI....
chwthewke/horbits
src/horbits/Horbits/UI/Camera/Control.hs
Haskell
bsd-3-clause
3,179
module ETA.CodeGen.Utils where import ETA.Main.DynFlags import ETA.BasicTypes.Name import ETA.Types.TyCon import ETA.BasicTypes.Literal import Codec.JVM import Data.Char (ord) import Control.Arrow(first) import ETA.CodeGen.Name import ETA.CodeGen.Rts import ETA.Debug import Data.Text (Text) import Data.Text.Encoding (...
pparkkin/eta
compiler/ETA/CodeGen/Utils.hs
Haskell
bsd-3-clause
3,217
{-# LANGUAGE DataKinds, GADTs, TypeFamilies, TypeOperators #-} module Text.Printf.Safe.Core (type (~>), Formatter, Printf(..), HList(..), printf, printf') where import Data.String (IsString (..)) -- | Variadic function types. type family (~>) as b where (~>) '[] a = a (~>) (x ': xs) a...
konn/safe-printf
src/Text/Printf/Safe/Core.hs
Haskell
bsd-3-clause
1,341
module Cakefile where import Development.Cake3 import Development.Cake3.Ext.UrWeb import Cakefile_P main = writeMake (file "Makefile") $ do prebuild [cmd|urweb -version|] u <- uwlib (file "Script.urp") $ do ffi (file "Script.urs") include (file "Script.h") src (file "Script.c") pkgconfig "jansso...
grwlf/cake3
Example/UrWeb/Cakefile.hs
Haskell
bsd-3-clause
698
-- | The issues API as described on <http://developer.github.com/v3/issues/>. module Github.Issues ( issue ,issue' ,issuesForRepo ,issuesForRepo' ,IssueLimitation(..) ,module Github.Data ) where import Github.Data import Github.Private import Data.List (intercalate) import Data.Time.Format (formatTime) import System....
erochest/github
Github/Issues.hs
Haskell
bsd-3-clause
3,623
module Wigner.Complex ( Complex((:+)), ComplexValued(conjugate), ComplexNum(fromComplexRational)) where import Data.Ratio import Wigner.Texable data Complex a = a :+ a deriving (Show, Eq) class ComplexValued a where conjugate :: a -> a instance (Num a) => ComplexValued (Complex a) where conjugat...
fjarri/wigner
src/Wigner/Complex.hs
Haskell
bsd-3-clause
1,348
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 Desugaring arrow commands -} {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} {-# OPTIONS_GHC -Wno-incomplete-record-updates #-} module DsArrows ( dsProcExpr ) where #include "HsVersions...
sdiehl/ghc
compiler/deSugar/DsArrows.hs
Haskell
bsd-3-clause
49,514
module Yawn.Test.BlackBox.ParserTest where import Test.HUnit import Yawn.Test.Common tests :: Test tests = TestList [ TestLabel "TestSimpleGet" testSimpleGet, TestLabel "TestSimplePost" testSimplePost, TestLabel "TestInvalidRequest" testInvalidRequest] testSimpleGet :: Test testSimpleGet = TestCase $ do resp...
ameingast/yawn
test/src/Yawn/Test/BlackBox/ParserTest.hs
Haskell
bsd-3-clause
903
{-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} module Test.SSH.Sender (sshSenderTests) where #if __GLASGOW_HASKELL__ < 710 import Control.Applicative #endif import Test.Tasty (TestTree, testGroup) ----------- -- Tests -- ----------- -- | TODO: tests. sshSenderTests :: TestTree sshSenderTests = testGroup ...
cdepillabout/ssh
test/Test/SSH/Sender.hs
Haskell
bsd-3-clause
354
{-# LANGUAGE QuasiQuotes, TypeFamilies #-} import Text.Papillon import Data.Char import System.Environment main :: IO () main = do arg : _ <- getArgs case runError $ expr $ parse arg of Right (r, _) -> print r Left _ -> putStrLn "parse error" [papillon| op1 :: Int -> Int -> Int = '*' { (*) } / '/' { div...
YoshikuniJujo/papillon
examples/arith.hs
Haskell
bsd-3-clause
659
{- (c) The AQUA Project, Glasgow University, 1993-1998 \section[Simplify]{The main module of the simplifier} -} {-# LANGUAGE CPP #-} module Simplify ( simplTopBinds, simplExpr, simplRules ) where #include "HsVersions.h" import DynFlags import SimplMonad import Type hiding ( substTy, substTyVar, extendTCvSubst...
gridaphobe/ghc
compiler/simplCore/Simplify.hs
Haskell
bsd-3-clause
123,812
{- Module : Main Description : UI and top level game loop Module which handles UI and top level game loop. -} module Main( main , module Exported ) where import Pentago.Data.Matrix as Exported import Pentago.Data.Pentago as Exported hiding (Player) import Pentago.Data.Tree as Exported import Pentago.AI.MinMax a...
gregorias/Pentago
src/Main.hs
Haskell
bsd-3-clause
6,757
-- | Module Parser transforms text files in a Tiles array (strongly typed). module Parser where import Hyrule import Data.Array import Text.Trifecta import Control.Applicative ((<|>)) data TerrainError = TerrainError data ObjectError = ObjectError parseTerrain :: AreaType -> Parser Terrain parseTerrain Overworld = ...
trxeste/wrk
haskell/TrabalhoIA/src/Parser.hs
Haskell
bsd-3-clause
2,283
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-...
emwap/feldspar-language
src/Feldspar/Core/Frontend.hs
Haskell
bsd-3-clause
12,977
module ETA.TypeCheck.TcForeign ( tcForeignImports , tcForeignExports -- Low-level exports for hooks , isForeignImport, isForeignExport , tcFImport --, tcFExport -- , tcForeignImports' , tcCheckFIType, checkJavaTarget, checkForeignArgs, checkForeignRes , normaliseFfiType , nonIOok, mustBeIO , checkSaf...
alexander-at-github/eta
compiler/ETA/TypeCheck/TcForeign.hs
Haskell
bsd-3-clause
12,447
-- | News page controller. This page simply downloads from -- haskellnews.org which already has a pre-prepared page of news to -- display. module HL.C.News where import HL.C import HL.M.News import HL.V.News -- | News controller. getNewsR :: C Html getNewsR = do html <- io getHaskellNews blaze (newsV html)
chrisdone/hl
src/HL/C/News.hs
Haskell
bsd-3-clause
318
-- A point is a point in the xy plane, represented by x and y coordinates -- E.g. (Point 0.0 0.0) is the origin, (Point (-1) (1)) is in the top left -- quadrant. data Point = Point Double Double deriving (Show, Eq) -- A line segment is a straight line of finite length, defined by its -- two end points. E.g. (Lin...
markstoehr/cs161
_site/fls/Lab2_flymake.hs
Haskell
cc0-1.0
879
{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Targets -- Copyright : (c) Duncan Coutts 2011 -...
mydaum/cabal
cabal-install/Distribution/Client/Targets.hs
Haskell
bsd-3-clause
31,363
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE MultiParamTypeClasses, Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Groups.Helpers -- Copyright : Quentin Moser <moserq@gmail.com> -- License : BSD-style (see LICEN...
f1u77y/xmonad-contrib
XMonad/Layout/Groups/Helpers.hs
Haskell
bsd-3-clause
8,103
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK hide #-} module Network.Xmpp.IM.Message where import Data.Default import Data.Function import Data.List import Data.Text (Text) import Data.XML.Pickle import Data.XML.Types import Network.Xmpp.Marshal import Network.Xmpp.Types data MessageBody = MessageBody { bo...
Philonous/pontarius-xmpp
source/Network/Xmpp/IM/Message.hs
Haskell
bsd-3-clause
4,325
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ViewPatterns #-} -- | The web server. module Ircbrowse.Server where import Ircbrowse.Types import qualified Ircbrowse.Controllers as C import Snap.App import Snap.Http.Server hiding (Config) import Snap.Util.FileServe ...
plow-technologies/ircbrowse
src/Ircbrowse/Server.hs
Haskell
bsd-3-clause
1,704
{---------------------------------------------------------------------------- Abstract syntax of JOOS, based on: David A. Watt. JOOS action semantics. Version 1, available from http://www.dcs.gla.ac.uk/~daw/publications/JOOS.ps, October 1997. Modifications: o StatFocus o StringLiterals ---------------...
forste/haReFork
StrategyLib-4.0-beta/examples/joos-padl02/Datatypes.hs
Haskell
bsd-3-clause
3,590
{-# LANGUAGE OverloadedStrings #-} module Stack.Options (Command(..) ,benchOptsParser ,buildOptsParser ,configOptsParser ,dockerOptsParser ,dockerCleanupOptsParser ,dotOptsParser ,execOptsParser ,globalOptsParser ,initOptsParser ,newOptsParser ,logLevelOptsParser ,ab...
wskplho/stack
src/Stack/Options.hs
Haskell
bsd-3-clause
21,355
{-# OPTIONS_GHC -fno-warn-missing-signatures #-} {-# LANGUAGE MultiParamTypeClasses, Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.Groups.Examples -- Copyright : Quentin Moser <moserq@gmail.com> -- License : BSD-style (see LICE...
MasseR/xmonadcontrib
XMonad/Layout/Groups/Examples.hs
Haskell
bsd-3-clause
8,792
-- Example.hs -- Examples from HUnit user's guide -- -- For more examples, check out the tests directory. It contains unit tests -- for HUnit. module Main where import Test.HUnit foo :: Int -> (Int, Int) foo x = (1, x) partA :: Int -> IO (Int, Int) partA v = return (v+2, v+3) partB :: Int -> IO Bool partB v =...
Numberartificial/workflow
snipets/.stack-work/install/x86_64-osx/lts-8.12/8.0.2/share/x86_64-osx-ghc-8.0.2/HUnit-1.2.5.2/examples/Example.hs
Haskell
mit
1,073
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="id-ID"> <title>OAST Support Add-on</title> <maps> <homeID>oast</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/oast/src/main/javahelp/org/zaproxy/addon/oast/resources/help_id_ID/helpset_id_ID.hs
Haskell
apache-2.0
965
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} ----------------------------------------------------------------------------- -- | -- Module : XMonad.Actions.WorkspaceCursors -- Copyright : (c) 2009 Adam Vogt <vogt.adam@gmail.com> -- License : BSD -- -- Maintainer : Adam Vo...
adinapoli/xmonad-contrib
XMonad/Actions/WorkspaceCursors.hs
Haskell
bsd-3-clause
8,231
module Grin.Lint( lintCheckGrin, typecheckGrin, transformGrin, dumpGrin ) where import Control.Exception import Control.Monad.Reader import Data.Monoid import System.IO import qualified Data.Set as Set import Doc.DocLike import Grin.Grin import Grin.Show import Options import Support.CanType impor...
m-alvarez/jhc
src/Grin/Lint.hs
Haskell
mit
12,583
{-# LANGUAGE CPP #-} -------------------------------------------------------------------------------- -- | Deal with Cmm registers -- module LlvmCodeGen.Regs ( lmGlobalRegArg, lmGlobalRegVar, alwaysLive, stgTBAA, baseN, stackN, heapN, rxN, otherN, tbaa, getTBAA ) where #include "HsVersions.h" im...
tjakway/ghcjvm
compiler/llvmGen/LlvmCodeGen/Regs.hs
Haskell
bsd-3-clause
5,550
{-# OPTIONS_GHC -w #-} {-# LANGUAGE FlexibleInstances, UndecidableInstances #-} module ShouldCompile where import Control.Monad.Reader instance Eq (a -> b) where _ == _ = error "whoops" instance Show (a -> b) where show = const "<fun>" -- This is the example from Trac #179 foo x = show (\_ -> True) -- ...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc217.hs
Haskell
bsd-3-clause
436
{-# LANGUAGE Trustworthy, Unsafe #-} -- | Basic test to see if Safe flags compiles module SafeFlags06 where f :: Int f = 1
urbanslug/ghc
testsuite/tests/safeHaskell/flags/SafeFlags06.hs
Haskell
bsd-3-clause
126
{-# OPTIONS_GHC -fwarn-warnings-deprecations #-} -- Test deprecation of constructors and class ops module ShouldCompile where import Rn050_A instance Foo T where op x = x bop y = y foo = op C
urbanslug/ghc
testsuite/tests/rename/should_compile/rn050.hs
Haskell
bsd-3-clause
202
{- | This module works with recursive data structure with cycles. -} module Data.Generics.Rec ( universeRec ) where import Data.Generics import Control.Monad.State import Data.Set import System.Mem.StableName import System.IO.Unsafe type RecState a = StateT (Set Int) IO a goRec :: (Data v, Data r) => v -> RecSta...
lomeo/unirec
src/Data/Generics/Rec.hs
Haskell
mit
1,167
{- | module: Main description: Querying the contents of OpenTheory packages license: MIT maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -} module Main ( main ) where import System.FilePath (isValid,takeDirectory,takeExtension) import qualified System.Environment as Environ...
gilith/hol
src/Main.hs
Haskell
mit
3,999
data Vector = Vector { x :: Double, y :: Double } deriving (Eq, Ord, Show) instance Num Vector where p1 + p2 = Vector (x p1 + x p2) (y p1 + y p2) p1 - p2 = p1 + negate p2 p1 * p2 = Vector (x p1 * x p2) (y p1 * y p2) abs (Vector x y) = Vector (sqrt (x * x + y * y)) 0 negate (Vector x y) = Vector (-x...
0xd34df00d/hencil
src/Vector.hs
Haskell
mit
507
{-# LANGUAGE RecordWildCards #-} module Hogldev.Pipeline ( Pipeline(..) , getTrans , PersProj(..) , Camera(..) ) where import Graphics.Rendering.OpenGL import Hogldev.Math3D import Hogldev.Utils import Hogldev.Camera data Pipeline = WPipeline { scaleInfo ...
triplepointfive/hogldev
common/Hogldev/Pipeline.hs
Haskell
mit
2,783
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE JavaScriptFFI #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE EmptyDataDecls #-} module JavaScript.Web.Blob.Internal where import Data.Typeable import GHCJS.Types data BlobType = BlobTypeBlob ...
tavisrudd/ghcjs-base
JavaScript/Web/Blob/Internal.hs
Haskell
mit
1,607
module Main where import Data.Bifunctor (first) import Data.Bits (testBit, unsafeShiftL) import Data.Bool (bool) import Data.Char (digitToInt) import Data.Foldable (foldl', traverse_) import Data.Function (on) import Data.List.NonEmpty (NonEmpty (..), fromList) readBits :: Str...
genos/online_problems
advent_of_code_2021/day16/Main.hs
Haskell
mit
3,088
{-# LANGUAGE FlexibleContexts, Rank2Types, NoMonomorphismRestriction #-} module Game.World.Lens ( objectBoundary , Get , Set , Component(..) , writeProp , compUnit , getWires , addWire , addObject , moveObject , isCollidable , getCollisionFilters , setCollisionEvent...
mfpi/q-inqu
Game/World/Lens.hs
Haskell
mit
9,726
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE ScopedTypeVariables #-} -- | This module deals with Exception logging. module System.Wlog.Exception ( logException , catchLog ) where import Universum import System.Wlog.CanLog (WithLogger, WithLoggerIO, logE...
serokell/log-warper
src/System/Wlog/Exception.hs
Haskell
mit
1,398
{-# LANGUAGE DatatypeContexts #-} module Ch13.Num where import qualified Data.List as L -------------------------------------------------- -- Symbolic/units manipulation -------------------------------------------------- data Op = Plus | Minus | Mul | Div | Pow deriving (Eq, Show, Ord) data SymbolicMan...
futtetennista/IntroductionToFunctionalProgramming
RWH/src/ch13/Num.hs
Haskell
mit
6,719
-- Copyright (C) 2013 Jorge Aparicio main :: IO() main = print $ squaredSumOfIntegers - sumOfSquaredIntegers where integers = [1..100] :: [Int] sumOfIntegers = sum integers squaredSumOfIntegers = sumOfIntegers * sumOfIntegers squaredIntegers = zipWith (*) integers integers ...
japaric/eulermark
problems/0/0/6/006.hs
Haskell
mit
366