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 RankNTypes, DeriveTraversable #-} -- | -- Module : Data.Map.Justified.Tutorial -- Copyright : (c) Matt Noonan 2017 -- License : BSD-style -- Maintainer : matt.noonan@gmail.com -- Portability : portable -- -- = Description -- -- The examples below demonstrate how to use the types and functi...
matt-noonan/justified-containers
src/Data/Map/Justified/Tutorial.hs
Haskell
bsd-2-clause
12,739
-- -- Replacer.hs -- -- Replace a subexpression with a different one. -- -- Gregory Wright, 18 September 2012 -- module Math.Symbolic.Wheeler.Replacer where import qualified Data.DList as DList import qualified Data.Map as Map import Data.Maybe import Math.Symbolic.Wheeler.Canonicalize import Math.Symbolic.Wheeler...
gwright83/Wheeler
src/Math/Symbolic/Wheeler/Replacer.hs
Haskell
bsd-3-clause
7,631
-- Commented out exports represent things left -- to do, or things that no longer make sense module Graphics.Xhb.Connection ( Connection , connect , connect' -- , I.parseDisplay -- no reason not to export, but not sure why we would? , writeRequests , maximumRequestLength , prefetchMaximumReuestLength , connec...
aslatter/xcb-core
Graphics/Xhb/Connection.hs
Haskell
bsd-3-clause
5,758
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module BitD.Protocol.VarData ( VarInt(..) , VarString(..) ) where import qualified Data.ByteString as BS import Data.String (IsString) import qualified Data.Binary.Get as BinG import qualified Data.Binary.Put as BinP import qualified Data.Binary as Bin...
benma/bitd
src/BitD/Protocol/VarData.hs
Haskell
bsd-3-clause
1,812
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- | -- Module : Data.Array.Accelerate.Pretty.HTML -- Copyright : [2010..2011] Sean Seefried -- License : BSD3 -- -- Maintainer : Manuel M T Chakravarty <chak@cse.unsw.edu.au> -- Stability : expe...
robeverest/accelerate
Data/Array/Accelerate/Pretty/HTML.hs
Haskell
bsd-3-clause
6,668
{-# LANGUAGE OverloadedStrings #-} module Site ( app ) where ------------------------------------------------------------------------------ import Control.Applicative import Data.IORef import Control.Monad.IO.Class import Data.ByteString (ByteString) import qualified Data.Text ...
archaephyrryx/CCG-Project
src/Site.hs
Haskell
bsd-3-clause
1,551
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RebindableSyntax #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeSynonymInstances #-} module Mandelbrot.NikolaV3.Implementation where import qualified Prelude as P import Prelude hiding (iterate, map, zipWith) import Data.Array.Nikola.Backend.CUDA import Data...
mainland/nikola
examples/mandelbrot/Mandelbrot/NikolaV3/Implementation.hs
Haskell
bsd-3-clause
3,277
module Sexy.Data.Bool ( bool' , otherwise , module X ) where import GHC.Types as X (Bool(..)) bool' :: a -> a -> Bool -> a bool' x _ True = x bool' _ x False = x otherwise :: Bool otherwise = True
DanBurton/sexy
src/Sexy/Data/Bool.hs
Haskell
bsd-3-clause
211
{-# LANGUAGE TypeOperators, Rank2Types, ConstraintKinds, FlexibleContexts, CPP #-} {-# LANGUAGE ViewPatterns, TupleSections #-} {-# LANGUAGE DeriveFunctor, DeriveFoldable #-} {-# OPTIONS_GHC -Wall #-} {-# OPTIONS_GHC -fcontext-stack=34 #-} -- for N32 -- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPT...
conal/type-encode
src/TypeEncode/Plugin.hs
Haskell
bsd-3-clause
13,134
{-# LANGUAGE NoImplicitPrelude #-} module HMenu.Provider (module X) where import HMenu.Provider.Path as X import HMenu.Provider.Types as X import HMenu.Provider.XDG as X
Adirelle/hmenu
src/HMenu/Provider.hs
Haskell
bsd-3-clause
205
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE GADTs #-} module Llvm.Pass.Rewriter where import Control.Monad import Data.Maybe import Prelude hiding (succ) import qualified Compiler.Hoopl as H import Llvm.Hir.Data import Llvm.Query.Type import Llvm.Util.Monadic (maybeM) import Debug.Trace type MaybeChange a = a -...
sanjoy/hLLVM
src/Llvm/Pass/Rewriter.hs
Haskell
bsd-3-clause
10,436
module Main where import FragnixServer ( application) import Network.Wai.Handler.Warp ( run) main :: IO () main = run 8081 application
phischu/fragnix-server
executable-src/Main.hs
Haskell
bsd-3-clause
144
{-# LANGUAGE OverloadedStrings #-} module Combined where import Nero import Nero.Application (nest) import Data.Text.Lazy (Text) name :: Request -> Maybe Text name = preview (_GET . path . prefixed "/hello/") surname :: Request -> Maybe Text surname = preview (param "surname") app1 :: Request -> Maybe Response app1...
plutonbrb/nero-examples
examples/Combined.hs
Haskell
bsd-3-clause
732
module Console ( defaultKeys , draw , getAction ) where import Data.Array.IArray import Data.Function (on) import Data.List (groupBy) import Graphics.Vty import Types draw :: Vty -> Level -> IO () draw vty level = do let level' = amap drawCell level cells = assocs level' rows = (map.map) snd $ g...
bjornars/HaskellGame
src/Console.hs
Haskell
bsd-3-clause
1,450
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-} module NanoParsec where import Data.Char import Control.Monad import Control.Applicative newtype Parser a = Parser { parse :: String -> [(a, String)] } runParser :: Parser a -> String -> a runParser m s = case parse m s of [(res, [])] -> res [(_, rs)] -> err...
zanesterling/haskell-compiler
src/NanoParsec/NanoParsec.hs
Haskell
bsd-3-clause
4,361
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE UnicodeSyntax #-} {-| [@ISO639-1@] - [@ISO639-2B@] paa [@ISO639-3@] hui [@Native name@] - [@English name@] Huli -} module Text.Numeral.Language.PAA.TestData (cardina...
telser/numerals
src-test/Text/Numeral/Language/PAA/TestData.hs
Haskell
bsd-3-clause
5,244
{-# LANGUAGE GeneralizedNewtypeDeriving, LambdaCase, RecordWildCards #-} -- | Stability: Experimental module Mahjong.Riichi where import Data.List as L (delete) -- import Data.MultiSet as MS import Mahjong.Class -- import Mahjong.Hand import Mahjong.Player import Mahjong.Tile -- * Ri...
TakSuyu/mahjong
src/Mahjong/Riichi.hs
Haskell
mit
4,623
module Crypto.Cipher.ECDSA.Util where import Data.Text.Lazy (Text) import Data.Text.Lazy.Read (hexadecimal) import qualified Data.ByteString.Lazy as BS readHexInteger :: Text -> Integer readHexInteger = either error fst . hexadecimal -- |Calulate the length in bits of an Integer (log2) bitSize :: Integer -...
fhaust/bitcoin
src/Crypto/Cipher/ECDSA/Util.hs
Haskell
mit
936
<?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="fa-IR"> <title>SOAP Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_fa_IR/helpset_fa_IR.hs
Haskell
apache-2.0
974
{- safely running shell commands - - Copyright 2010-2013 Joey Hess <joey@kitenet.net> - - License: BSD-2-clause -} module Utility.SafeCommand where import System.Exit import Utility.Process import System.Process (env) import Data.String.Utils import Control.Applicative import System.FilePath import Data.Char {-...
abailly/propellor-test2
src/Utility/SafeCommand.hs
Haskell
bsd-2-clause
3,995
module SDL.Input ( module SDL.Input.GameController , module SDL.Input.Joystick , module SDL.Input.Keyboard , module SDL.Input.Mouse ) where import SDL.Input.GameController import SDL.Input.Joystick import SDL.Input.Keyboard import SDL.Input.Mouse
svenkeidel/sdl2
src/SDL/Input.hs
Haskell
bsd-3-clause
258
----------------------------------------------------------------------------- -- | -- Module : Network.Hackage.CabalInstall.Setup -- Copyright : (c) David Himmelstrup 2005 -- License : BSD-like -- -- Maintainer : lemmih@gmail.com -- Stability : provisional -- Portability : portable -- -- -----------...
FranklinChen/hugs98-plus-Sep2006
packages/Cabal/Network/Hackage/CabalInstall/Setup.hs
Haskell
bsd-3-clause
8,823
{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module Test.Foundation.Network.IPv6 ( testNetworkIPv6 ) where import Foundation import Foundation.Check import Foundation.Network.IPv6 import Test.Data.Network import Test.Foundation.Storable -- | test pr...
vincenthz/hs-foundation
foundation/tests/Test/Foundation/Network/IPv6.hs
Haskell
bsd-3-clause
2,307
module Sql ( module Sql.Init , module Sql.Sessions , module Sql.Users , module Sql.Utils ) where import Sql.Init import Sql.Sessions import Sql.Users import Sql.Utils
hherman1/CatanServ
src/Sql.hs
Haskell
bsd-3-clause
188
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-} {-# OPTIONS -Wall #-} module Main(main) where import Control.Applicative import Control.Monad hiding (forM) import qualified Data.Text.IO as T import Data.Foldable as Foldable import Data.Traversable import Data...
nushio3/Paraiso
examples-old/Life/LifeMain.hs
Haskell
bsd-3-clause
4,756
module Main where import Hans.NetworkStack import qualified Hans.Layer.Ethernet as Eth import Hans.Device.Pcap main :: IO () main = do ns <- newNetworkStack Just (dev,nd) <- openPcap "eth0" $ Just $ Mac 1 2 3 4 5 6 print nd let Just mac = (ndMAC nd) Eth.addEthernetDevice (nsEthernet ns) mac (pcapSend dev)...
tolysz/hans-pcap
example/test.hs
Haskell
bsd-3-clause
433
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Control/Monad/Trans/Control.hs" #-} {-# LANGUAGE CPP , NoImplicitPrelude , RankNTypes , TypeFamilies , FunctionalDependencies , FlexibleInstances , Undecidab...
phischu/fragnix
tests/packages/scotty/Control.Monad.Trans.Control.hs
Haskell
bsd-3-clause
24,430
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Take an existing build plan and bump all packages to the newest version in -- the same major version number. module Stackage.UpdateBuildPlan ( updateBuildConstraints , updateBuildPlan ) where impor...
jeffreyrosenbluth/stackage
Stackage/UpdateBuildPlan.hs
Haskell
mit
2,121
{-# LANGUAGE NoMonomorphismRestriction #-} module Main where import Data.List import Data.Dynamic import System.Directory import System.IO import System.Environment (getArgs, getProgName) import System.Exit (exitFailure) import Text.Parsec import qualified Data.Map.Strict as M import qualified Data.Number.LogFloat a...
zaxtax/hakaru
haskell/Examples/Quadrotor.hs
Haskell
bsd-3-clause
5,892
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstan...
fmthoma/ghc
compiler/hsSyn/HsDecls.hs
Haskell
bsd-3-clause
70,357
{-# LANGUAGE CPP #-} -- | Handy functions for creating much Core syntax module ETA.Core.MkCore ( -- * Constructing normal syntax mkCoreLet, mkCoreLets, mkCoreApp, mkCoreApps, mkCoreConApps, mkCoreLams, mkWildCase, mkIfThenElse, mkWildValBinder, mkWildEvBinder, sortQuantV...
pparkkin/eta
compiler/ETA/Core/MkCore.hs
Haskell
bsd-3-clause
31,881
{-| Module : Idris.Unlit Description : Turn literate programs into normal programs. Copyright : License : BSD3 Maintainer : The Idris Community. -} module Idris.Unlit(unlit) where import Idris.Core.TT import Data.Char unlit :: FilePath -> String -> TC String unlit f s = do let s' = map ulLine (lines s) ...
tpsinnem/Idris-dev
src/Idris/Unlit.hs
Haskell
bsd-3-clause
1,276
{-# LANGUAGE StandaloneKindSignatures #-} {-# LANGUAGE NoPolyKinds #-} module T16722 where import Data.Kind type D :: k -> Type data D a
sdiehl/ghc
testsuite/tests/saks/should_fail/T16722.hs
Haskell
bsd-3-clause
140
{-# LANGUAGE ViewPatterns #-} -- Simple implementation of the Lambda Calculus. module Lambda where -- The datatype of Lambda Calculus terms. data Term = Lam !Term | App !Term !Term | Var !Int deriving (Show,Eq,Ord) -- Folds over a term. fold :: (t -> t) -> (t -> t -> t) -> (Int -> t) -> Term -> ...
shaunstanislaus/caramel
src/Lambda.hs
Haskell
mit
1,620
{-# htermination (pt :: (c -> a) -> (b -> c) -> b -> a) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil pt :: (b -> a) -> (c -> b) -> c -> a; pt f g x = f (g x);
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/DOT_1.hs
Haskell
mit
235
module Euler.Problem3Spec ( spec ) where import Helper import Euler.Problem3 spec :: Spec spec = do describe "primeFactors" $ do it "of 3" $ do (primeFactors 3 :: [Int]) `shouldBe` ([3] :: [Int]) it "of 6" $ do (primeFactors 6 :: [Int]) `shouldBe` ([2,3] :: [Int]) it "of 8" $ do (pri...
slogsdon/haskell-exercises
pe/testsuite/specs/Euler/Problem3Spec.hs
Haskell
mit
642
module HaskellCourse.UntypedLC.Parser (parseExp) where import Data.Maybe (fromMaybe) import HaskellCourse.Parsing import HaskellCourse.Prim import HaskellCourse.UntypedLC.AST parseExp :: SExpr -> Exp parseExp (AtomNum n) = LitInt n parseExp (AtomSym s) = parseVar s parseExp (List [AtomSym "let", List [AtomSym v, e],...
joshcough/HaskellCourse
src/HaskellCourse/UntypedLC/Parser.hs
Haskell
mit
745
-- module EventEmitter where {-# LANGUAGE OverloadedStrings #-} import Control.Concurrent import Control.Monad import Data.JSString import Data.String import GHCJS.Foreign import GHCJS.Foreign.Callback import GHCJS.Types import JavaScript.A...
beijaflor-io/ghcjs-commonjs
old-examples/EventEmitter.hs
Haskell
mit
2,307
module Sgd.Num.Vector where -- http://stackoverflow.com/questions/17892065/mutable-random-access-array-vector-with-high-performance-in-haskell -- http://haskell.1045720.n5.nabble.com/fishing-for-ST-mutable-Vector-examples-td4333461.html -- import qualified Data.IntMap as IntMap import qualified Data.Vector.Unboxed as...
daz-li/svm_sgd_haskell
src/Sgd/Num/Vector.hs
Haskell
mit
1,594
import Configuration.Dotenv (loadFile) import Database.PostgreSQL.Simple.Util (withTransactionRolledBack) import RunMigrations (runAllMigrations) import Test.Hspec (around_, describe, hspec) import Util (getConn) import qualified ConferenceSpec main :: IO () main = do loadFile False "config/config.env" conn <...
robertjlooby/confsinfo
backend/test/Spec.hs
Haskell
mit
499
import Haste import Haste.DOM import Haste.Graphics.Canvas import Basal steps :: Int steps = 20000 size :: Int size = 500 main = do Just canv <- getCanvasById "field" Just button <- elemById "button" _ <- onEvent button OnClick (onButtonClick canv steps) seed <- newSeed renderRW canv seed steps ...
lesguillemets/schrammloewner
src/HexaRandom.hs
Haskell
mit
650
{-# LANGUAGE InstanceSigs #-} module TwentyFive where import Control.Applicative (liftA2) newtype Compose f g a = Compose { getCompose :: f (g a) } deriving (Eq, Show) instance (Functor f, Functor g) => Functor (Compose f g) where fmap f (Compose fga) = Compose $ (fmap . fmap) f fga -- Twinplicative...
mudphone/HaskellBook
src/TwentyFive.hs
Haskell
mit
2,150
{-# LANGUAGE UnicodeSyntax #-} module Pixs.Operations.Pixel where import Codec.Picture (PixelRGBA8(..)) import Data.Word import Control.Arrow ((***)) limit ∷ (Num c, Ord c) ⇒ c → c limit = max 0 . min 255 -- TODO: PixelRGBA8 should not really have an instance of -- ...
ayberkt/pixs
src/Pixs/Operations/Pixel.hs
Haskell
mit
3,335
{-# LANGUAGE RankNTypes #-} -- | A convenience wrapper around Options.Applicative. module SimpleOptions ( simpleOptions , Options.addCommand , Options.simpleVersion ) where import Control.Applicative import Control.Monad.Trans.Either (EitherT) import Control.Monad.Trans.W...
fpco/stackage-cli
src/SimpleOptions.hs
Haskell
mit
1,194
module Y2018.M07.D30.Exercise where import Data.Set (Set) -- We have two databases pilot, entities, exDir :: FilePath exDir = "Y2018/M07/D30/" pilot = "pilot_db.csv" entities = "entities_db.csv" -- We want to merge those databases into one SUPER-database -- Read in the tables from each database (mind the header in...
geophf/1HaskellADay
exercises/HAD/Y2018/M07/D30/Exercise.hs
Haskell
mit
675
{-# LANGUAGE FlexibleInstances #-} module Sixteen where import GHC.Arr import Test.QuickCheck a = fmap (+1) $ read "[1]" :: [Int] b = (fmap . fmap) (++ "lol") (Just ["Hi,", "Hello"]) c = (*2) . (\x -> x - 2) d = ((return '1' ++) . show) . (\x -> [x, 1..3]) e :: IO Integer e = let ioi = readIO "1" :: IO Integer ...
mudphone/HaskellBook
src/Sixteen.hs
Haskell
mit
7,282
module Proteome.Buffers.Syntax where import qualified Data.Map.Strict as Map (fromList) import Ribosome.Data.Syntax ( HiLink(HiLink), Syntax(Syntax), SyntaxItem(siOptions, siParams), syntaxMatch, syntaxVerbatim, ) import Text.RawString.QQ (r) asterisk :: SyntaxItem asterisk = item { siOptions = options,...
tek/proteome
packages/proteome/lib/Proteome/Buffers/Syntax.hs
Haskell
mit
1,318
{-# LANGUAGE GADTs, KindSignatures, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, ScopedTypeVariables, TypeFamilies, EmptyDataDecls #-} module Language.SPL.Intermediate ( Intermediate (..), Index (..), Layout (..), peek, Translate (..), translate, convert, Accumulator (..), stochastic ) where import quali...
vbalalla/financial_contract_language
Language/Intermediate.hs
Haskell
mit
8,979
-- Copyright (c) 2015 Bart Massey -- [This program is licensed under the "2-clause ('new') BSD License"] -- Please see the file COPYING in the source -- distribution of this software for license terms. import Text.SSV tsvFormat :: SSVFormat tsvFormat = csvFormat { ssvFormatSeparator = '\t' } main :: IO () main = int...
BartMassey/haskell-basic-examples
tabcomma2.hs
Haskell
bsd-2-clause
356
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE Unsafe #-} {-# OPTIONS_HADDOCK show-extensions #-} {-| Copyright : (C) 2015, University of Twente License : BSD2 ...
Ericson2314/clash-prelude
src/CLaSH/Prelude/ROM/File.hs
Haskell
bsd-2-clause
11,995
module TestTypes (run) where {- Everything below this comment can be copy-pasted into: https://repl.it/languages/haskell The on-line Haskell REPL doesn't seem to support selective imports of Prelude, so (+) has been replaced with (~+). -} infixl 6 ~+ class Additive a where (~+) :: a -> a -> a zero :: a instanc...
pmilne/algebra
test/TestTypes.hs
Haskell
bsd-3-clause
2,068
#!/usr/local/bin/runghc {-# OPTIONS_GHC -Wall #-} {-# LANGUAGE Trustworthy,ScopedTypeVariables #-} module Main ( main ) where import MaintainData import System.Environment import System.Process import System.Directory import System.Exit import System.IO.Extra(writeFi...
Xidian-Haskell-Server-Keeper/XHSK-Home
maintain/Main.hs
Haskell
bsd-3-clause
1,061
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ {-# LANGUAGE DeriveDataTypeable, StandaloneDeriving #-} #endif #if !defined(TESTING) && __GLASGOW_HASKELL__ >= 703 {-# LANGUAGE Trustworthy #-} #endif #if __GLASGOW_HASKELL__ >= 708 {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE TypeFamilies #-} #endif #include "containers.h...
DavidAlphaFox/ghc
libraries/containers/Data/Map/Base.hs
Haskell
bsd-3-clause
111,520
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, DataKinds, ViewPatterns,GADTs #-} import GL import OpenGlDigits import Control.Concurrent.STM import Control.Concurrent import Graphics.UI.Gtk hiding (Point,Signal, Object) import Graphics.UI.Gtk.OpenGL import Graphics.Rendering.OpenGL hiding (Projection) import...
paolino/sprites
ConnectsMain.hs
Haskell
bsd-3-clause
12,387
{-# LANGUAGE MagicHash, NoImplicitPrelude, TypeFamilies, UnboxedTuples, RoleAnnotations #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Types -- Copyright : (c) The University of Glasgow 2009 -- License : see libraries/ghc-prim/LICENSE --...
alexander-at-github/eta
libraries/ghc-prim/GHC/Types.hs
Haskell
bsd-3-clause
9,300
module Day13 (part1, part2, test1, getTile, showMap, testMap, part2Solution, part1Solution) where import Data.Bits import Data.Graph.AStar import qualified Data.HashSet as H import Data.List import Data.Graph.Inductive.Query.BFS import Data.Graph.Inductive.Graph import Data.Graph.Inductive.Patr...
z0isch/aoc2016
src/Day13.hs
Haskell
bsd-3-clause
2,741
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE Flexib...
rolph-recto/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Generate2.hs
Haskell
bsd-3-clause
73,935
{-# LANGUAGE OverloadedStrings #-} module Storage.Object.Aws where import qualified Aws import qualified Aws.Core as Aws import qualified Aws.S3 as S3 import Control.Monad.IO.Class import Control.Monad.Trans.Resource (runResourceT) import qualified Data.ByteString as S import qualified Data.Text as T import q...
wayofthepie/collect
src/Storage/Object/Aws.hs
Haskell
bsd-3-clause
1,807
{-# LANGUAGE OverloadedStrings #-} module Main where import Prelude hiding ((.), id) import Control.Category import Data.Monoid import Data.Maybe import Control.Applicative import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as BS import qualif...
bernstein/ircfs
tests/TestEncode.hs
Haskell
bsd-3-clause
7,347
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} module Spec.Wordpress (tests) where import qualified Data.Text as T import qualified Data.XML.Types as XML import Hakyll.Convert.Common (DistilledPost (..)) import Hakyll.Convert.Wordpress import Spec.SpecHelpers import Test.Tasty (TestTree, testG...
kowey/hakyll-convert
test/spec/Spec/Wordpress.hs
Haskell
bsd-3-clause
12,402
{-# LANGUAGE DeriveDataTypeable #-} -- | -- Module : Network.Socks5.Types -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : experimental -- Portability : unknown module Network.Socks5.Types ( SocksVersion(..) , SocksCommand(..) , SocksMethod(..) , Sock...
erikd/hs-socks
Network/Socks5/Types.hs
Haskell
bsd-3-clause
5,911
module SSH.Sender where import Control.Concurrent.Chan import Control.Monad (replicateM) import Data.Word import System.IO import System.Random import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import SSH.Debug import SSH.Crypto import SSH.Packet import SSH.Util data SenderState ...
alexbiehl/hs-ssh
src/SSH/Sender.hs
Haskell
bsd-3-clause
3,569
{-#LANGUAGE DeriveDataTypeable , DeriveFunctor , DeriveFoldable , DeriveTraversable #-} module Language.Asdf.AST where import Data.Data import Data.Foldable import Data.Traversable import qualified Data.Map as Map import Text.Parsec data Prec = None | In Rational |...
sw17ch/Asdf
src/Language/Asdf/AST.hs
Haskell
bsd-3-clause
2,563
{-# LANGUAGE OverloadedStrings, PackageImports #-} import Control.Applicative import Control.Monad import "monads-tf" Control.Monad.Trans import Data.HandleLike import System.Environment import Network import Network.PeyoTLS.ReadFile import Network.PeyoTLS.Client import "crypto-random" Crypto.Random import qualified ...
YoshikuniJujo/peyotls
peyotls/examples/checkMyServer.hs
Haskell
bsd-3-clause
1,111
module Day5.DoesntHeHaveInternElvesForThis ( countNiceStrings ) where import Data.List as L import Data.List.Split as S countNiceStrings :: String -> Int countNiceStrings = undefined -- filter doesNotContainDisallowedStrings . filter containsAtLeastOneLetterThatAppearsTwiceInARow . filter hasAtLeastThreeVowel...
fboyer/adventofcode-haskell
src/Day5/DoesntHeHaveInternElvesForThis.hs
Haskell
bsd-3-clause
1,335
{-# OPTIONS_GHC -fno-warn-unused-imports #-} module Diagrams.Backend.HsQML.Tutorial ( -- * DiagramCanvas QML script -- $diagramcanvas -- * Context object -- $contextobject -- * Main window -- $mainwindow -- * Rendering diagrams -- $rendering ) where import Graphics.QML import Diagrams.Backend.HsQML import Diagrams...
marcinmrotek/diagrams-hsqml
src/Diagrams/Backend/HsQML/Tutorial.hs
Haskell
bsd-3-clause
5,634
{-# LANGUAGE PatternGuards #-} import System.Exit (exitSuccess) import qualified Debug.Trace as T import Control.Monad (forM_, when) import Control.Monad.ST (runST) import Control.Applicative ((<$>)) import qualified Data.Vector as Vec import qualified Data.Vector.Mutable as VM import Data.Vector ((!), (//)) import qu...
dan-t/clothsim
Main.hs
Haskell
bsd-3-clause
7,158
module Main where import Data.Monoid () import Test.Framework import Test.Framework.Providers.HUnit import Test.Framework.Providers.QuickCheck2 import Test.HUnit import Test.QuickCheck import qualified TestDigram import qualified TestEnnGramMap import qualified TestCandSel import qualified Properties main :: IO () ...
pcrama/message-compiler
test/Suite.hs
Haskell
bsd-3-clause
2,810
----------------------------------------------------------------------------- -- | -- Module : RefacAsPatterns -- Copyright : (c) Christopher Brown 2007 -- -- Maintainer : cmb21@kent.ac.uk -- Stability : provisional -- Portability : portable -- -- This module contains a transformation for HaRe. -- Conver...
forste/haReFork
refactorer/RefacAsPatterns.hs
Haskell
bsd-3-clause
18,714
module WSC.Util where import Control.Applicative import Data.ByteString.UTF8 as UTF8 import Data.HashSet as HashSet tupleA :: Applicative f => f a -> f b -> f (a, b) tupleA = liftA2 (,) set :: [String] -> HashSet ByteString set = HashSet.fromList . fmap UTF8.fromString
DylanLukes/Winchester-STG-Compiler
WSC/Util.hs
Haskell
bsd-3-clause
272
{-# LANGUAGE PatternGuards, DeriveFunctor, TypeSynonymInstances #-} module Idris.Core.CaseTree(CaseDef(..), SC, SC'(..), CaseAlt, CaseAlt'(..), Phase(..), CaseTree, simpleCase, small, namesUsed, findCalls, findUsedArgs) where import Idris.Core.TT import Control.Monad.State i...
ctford/Idris-Elba-dev
src/Idris/Core/CaseTree.hs
Haskell
bsd-3-clause
25,707
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Plot traces to html using lucid Example code: @ plotHtml :: Html () plotHtml = toHtml $ plotly "myDiv" [trace] & layout . title ?~ "my plot" & layout . width ?~ 300 @ where...
filopodia/open
plotlyhs/src/Graphics/Plotly/Lucid.hs
Haskell
mit
1,351
-- Copyright (c) 2013 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
src/Data/Hashable/ExtraInstances.hs
Haskell
bsd-3-clause
2,424
{-# LANGUAGE ForeignFunctionInterface, CPP, FlexibleContexts, RankNTypes #-} {-| Bindings to the CUDD BDD library This is a straightforward wrapper around the C library. See <http://vlsi.colorado.edu/~fabio/CUDD/> for documentation. Exampe usage: > import Cudd.Cudd > > main = do > let manager = cuddInit > ...
maweki/haskell_cudd
Cudd/Cudd.hs
Haskell
bsd-3-clause
14,778
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE DeriveDataTypeable #-} module VSim.VIR.Monad ( ParserState(..) , Parser(..) , ParserError(..) , runParser , newState , formatEr...
ierton/vsim
src/VSim/VIR/Monad.hs
Haskell
bsd-3-clause
3,322
{-# LANGUAGE BangPatterns, CPP, MagicHash, Rank2Types, UnboxedTuples #-} {-# OPTIONS_GHC -fno-full-laziness -funbox-strict-fields #-} -- | Zero based arrays. -- -- Note that no bounds checking are performed. module Data.HashMap.Array ( Array , MArray -- * Creation , new , new_ , singleton ...
bgamari/unordered-containers
Data/HashMap/Array.hs
Haskell
bsd-3-clause
13,153
module Dotnet.System.Xml.XmlAttributeTy where import Dotnet import Dotnet.System.Xml.XmlNodeTy data XmlAttribute_ a type XmlAttribute a = Dotnet.System.Xml.XmlNodeTy.XmlNode (XmlAttribute_ a)
alekar/hugs
dotnet/lib/Dotnet/System/Xml/XmlAttributeTy.hs
Haskell
bsd-3-clause
195
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} ...
tolysz/prepare-ghcjs
spec-lts8/base/Data/Type/Equality.hs
Haskell
bsd-3-clause
11,498
module ImportifyUsed (doCache) where import Importify.Main (doCache)
serokell/importify
test/test-data/importify@project/01-ImportifyUsed.hs
Haskell
mit
80
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE...
anton-dessiatov/stack
src/Stack/Fetch.hs
Haskell
bsd-3-clause
28,789
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} module Bug where import Data.Kind data family Sing (a :: k) data HR (a :: j) (b :: k) where HRefl :: HR a a data instance Sing (z :: HR a...
ezyang/ghc
testsuite/tests/typecheck/should_compile/T13879.hs
Haskell
bsd-3-clause
703
module A6 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. --Rename type Constructor 'BTree' to 'MyBTree' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtree...
kmate/HaRe
old/testing/unfoldAsPatterns/A6_TokOut.hs
Haskell
bsd-3-clause
780
module Opaleye.SQLite.Operators (module Opaleye.SQLite.Operators) where import qualified Data.Foldable as F import Opaleye.SQLite.Internal.Column (Column(Column), unsafeCase_, unsafeIfThenElse, unsafeGt, unsafeEq) import qualified Opaleye.SQLite.Internal.Column as C...
bergmark/haskell-opaleye
opaleye-sqlite/src/Opaleye/SQLite/Operators.hs
Haskell
bsd-3-clause
2,541
module Lib ( someFunc ) where someFunc :: IO () someFunc = print "some func"
juhp/stack
test/integration/tests/3396-package-indices/files/src/Lib.hs
Haskell
bsd-3-clause
88
------------------------------------------------------------------------------ -- | -- Module: Plugins.Utils -- Copyright: (c) 2010 Jose Antonio Ortega Ruiz -- License: BSD3-style (see LICENSE) -- -- Maintainer: Jose A Ortega Ruiz <jao@gnu.org> -- Stability: unstable -- Portability: unportable -- Created: Sat Dec 11, 2...
tsiliakis/xmobar
src/Plugins/Utils.hs
Haskell
bsd-3-clause
1,067
{-# OPTIONS -fwarn-tabs #-} -- Check we get a warning for multiple tabs, with the correct number of tabs -- mentioned module ShouldCompile where -- tab in middle of line tab1 = 'a' -- tab at end of line tab2 = 'b' -- two tabs in middle of line tab3 = 'c' tab4 = if True -- tab at start of line then 'd' -- tab at...
urbanslug/ghc
testsuite/tests/parser/should_compile/T9723b.hs
Haskell
bsd-3-clause
378
module Graphics.Urho3D.Input.InputConstants( MouseButton(..) , MouseButtonFlags , Qualifier(..) , QualifierFlags , Key(..) , Scancode(..) , HatPosition(..) , ControllerButton(..) , ControllerAxis(..) ) where import GHC.Generics import Graphics.Urho3D.Container.FlagSet import Data.Word import qua...
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Input/InputConstants.hs
Haskell
mit
89,469
module Rebase.Data.Text.Internal ( module Data.Text.Internal ) where import Data.Text.Internal
nikita-volkov/rebase
library/Rebase/Data/Text/Internal.hs
Haskell
mit
98
-- vim: ts=2:sw=2:sts=2 {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses, DeriveDataTypeable, TypeSynonymInstances #-} module XMonad.Config.Amer.Layout ( MyTransformers(..) ) where import XMonad (Typeable, Window) import XMonad.Layout (Full(..)) import XMonad.Layout.NoBord...
amerlyq/airy
xmonad/cfg/Layout.hs
Haskell
mit
961
{- HAAP: Haskell Automated Assessment Platform This module provides functions for processing Literate Haskell source code files. -} {-# LANGUAGE BangPatterns, FlexibleContexts #-} module HAAP.Code.Literate.Haskell ( lhs2hs, lhs2lhs, compileLHS ) where import HAAP.Core import HAAP.IO import HAAP.Shelly ...
hpacheco/HAAP
src/HAAP/Code/Literate/Haskell.hs
Haskell
mit
3,350
module Lessons.Lesson6 where import Geometry quadrilateral [a,b,c,d] | across c (a,b) d = (d,b,c,a) | across a (b,c) d = (a,b,d,c) | otherwise = (a,b,c,d)
alphalambda/k12math
prog/lib/geo/Lessons/Lesson6.hs
Haskell
mit
206
-- Algorithms/Sorting/Insertion Sort - Part 1 module Main where import qualified HackerRank.Algorithms.InsertionSortPart1 as M main :: IO () main = M.main
4e6/sandbox
haskell/hackerrank/InsertionSortPart1.hs
Haskell
mit
158
{-# htermination minFM :: Ord a => FiniteMap [a] b -> Maybe [a] #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_minFM_4.hs
Haskell
mit
85
-- |Netrium is Copyright Anthony Waite, Dave Hewett, Shaun Laurens & Contributors 2009-2018, and files herein are licensed -- |under the MIT license, the text of which can be found in license.txt -- -- The definition of the basic contract language {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Contract ( -- *...
netrium/Netrium
src/Contract.hs
Haskell
mit
11,527
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Text.Regex.Base.RegexLike import Text.Regex.PCRE.ByteString import Data.Traversable import qualified Data.ByteString as BS main :: IO () main = do let rawSample = "[VER:v=12.45|stuff1|stuff2|stuff3[X], extra1, extra2, extra 3]" Right re <- ...
Javran/misc
regex-playground/src/Main.hs
Haskell
mit
547
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ViewPatterns #-} module Hpack.Syntax.BuildTools ( BuildTools(..) , ParseBuildTool(..) , SystemBuildTools(..) ) where import Data.Text (Text) import qualified Data.Text as T import Data.Semigroup (Semigroup...
haskell-tinc/hpack
src/Hpack/Syntax/BuildTools.hs
Haskell
mit
3,490
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} ------------------------------------------- -- | -- Module : Web.Stripe.Charge -- Copyright : (c) David Johnson, 2014 -- Maintainer : djohnson.m@gmail.com -...
dmjio/stripe
stripe-core/src/Web/Stripe/Charge.hs
Haskell
mit
6,989
{-# LANGUAGE OverloadedStrings #-} module Document.Tests.TrainStation ( test_case ) where -- Modules import Document.Tests.Suite -- (verify,find_errors,proof_obligation) import Logic.Expr import qualified Logic.Expr.Const as Expr import Logic.Expr.Parser import Logic.Proof import Logic.QuasiQuote import Lo...
literate-unitb/literate-unitb
src/Document/Tests/TrainStation.hs
Haskell
mit
283,395
module Levenshtein where levenshtein :: String -> String -> Int levenshtein "" b = 0 levenshtein a "" = 0 levenshtein a b = compare a b + levenshtein (tail a) (tail b) where compare a b = if head a == head b then 0 else 1
ostera/asdf
haskell/Levenshtein.hs
Haskell
mit
225
-- | This module is an extension of the "RectBinPacker.Bin" module and provides an interface that -- allows you to insert a rotatable object into a 'Bin'. The orientation of the object will be -- automatically determined to be the best fit. -------------------------------------------------------------------------------...
jochu/image-bin-packing
src/RectBinPacker/BinRotatable.hs
Haskell
mit
2,037