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 GeneralizedNewtypeDeriving, CPP, TypeSynonymInstances, FlexibleInstances #-} ----------------------------------------------------------------------------- -- | -- Module : Perfs -- Copyright : (c)2011, Texas Instruments France -- License : BSD-style (see the file LICENSE) -- -- Maintainer ...
ChristopheF/OpenCLTestFramework
Client/Perfs.hs
Haskell
bsd-3-clause
5,643
{-# LANGUAGE TemplateHaskell #-} module Chess.Search.SearchResult ( SearchResult(..) , (<@>) , (<++>) , first , second , eval , moves ) where import Control.Lens import Control.Monad import Data.Maybe import qualified Chess.Move as...
phaul/chess
Chess/Search/SearchResult.hs
Haskell
bsd-3-clause
1,147
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_HaskellEngine ( version, getBinDir, getLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception import Data....
MyForteIsTimeTravel/HaskellEngine
dist/build/autogen/Paths_HaskellEngine.hs
Haskell
bsd-3-clause
1,816
myNot True = False myNot False = True sumList (x:xs) = x + sumList xs sumList [] = 0
NeonGraal/rwh-stack
ch03/add.hs
Haskell
bsd-3-clause
90
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} module KMC.Util.Bits ( DoubleBits(combine, split), packCombine, unpackSplit ) where import Data.Bits (shift, (.|.), (.&.), complement, finiteBitSize, clearBit, Bits(bit), FiniteBits) import Data.Word (Word8, Word16, Word32, Word64) -- | Pack two 8-bit wo...
diku-kmc/repg
src/KMC/Util/Bits.hs
Haskell
mit
2,101
module Main where import Web.GitHub.CLI.Options import Web.GitHub.CLI.Actions import Options.Applicative import Network.Octohat.Types (OrganizationName(..), TeamName(..)) import qualified Data.Text as T (pack) accessBotCLI :: TeamOptions -> IO () accessBotCLI (TeamOptions (ListTeams nameOfOrg)) = findTeamsInOrgani...
stackbuilders/octohat
src-demo/Web/GitHub/CLI/Main.hs
Haskell
mit
1,385
import Universum import Test.Hspec (hspec) import Spec (spec) main :: IO () main = hspec spec
input-output-hk/pos-haskell-prototype
util/test/test.hs
Haskell
mit
131
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Stack.Options (BuildCommand(..) ,GlobalOptsContext(..) ,benchOptsParser ,buildOptsParser ,cleanOptsParser ,configCmdSetParser ,configOptsParser ,dockerOptsParser ,dockerCleanupOptsParser ,dotOptsParser ...
phadej/stack
src/Stack/Options.hs
Haskell
bsd-3-clause
37,388
-- Par monad and thread representation; types -- -- Visibility: HpH.Internal.{IVar,Sparkpool,Threadpool,Scheduler} -- Author: Patrick Maier <P.Maier@hw.ac.uk> -- Created: 28 Sep 2011 -- {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TemplateHaskel...
robstewart57/hdph-rs
src/Control/Parallel/HdpH/Internal/Type/Par.hs
Haskell
bsd-3-clause
3,793
{-# LANGUAGE TypeOperators, TypeSynonymInstances #-} {-# LANGUAGE GADTs, KindSignatures #-} {-# OPTIONS_GHC -Wall #-} -- {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- TEMP -- {-# OPTIONS_GHC -fno-warn-unused-binds #-} -- TEMP ---------------------------------------------------------------------- -- | -- Module ...
capn-freako/circat
src/Circat/LinearMap.hs
Haskell
bsd-3-clause
1,746
{-# LANGUAGE CPP #-} {-# LANGUAGE RecordWildCards #-} import Control.Monad (unless) import Data.Monoid import Data.Version (showVersion) import Options.Applicative import System.Environment (getEnvironment) import ...
frontrowed/yesod
yesod-bin/main.hs
Haskell
mit
11,794
athing = and [a, b]
mpickering/hlint-refactor
tests/examples/AndList.hs
Haskell
bsd-3-clause
20
<?xml version='1.0' encoding='ISO-8859-1' ?> <!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"> <!-- title --> <title>Spring Rich Simple Sample Help</title> <!-- maps --> <maps...
lievendoclo/Valkyrie-RCP
valkyrie-rcp-samples/valkyrie-rcp-simple-sample/src/main/resources/help/simple.hs
Haskell
apache-2.0
756
{-# LANGUAGE MultiParamTypeClasses #-} import Data.Coerce (Coercible) instance Coercible () () main = return ()
ezyang/ghc
testsuite/tests/typecheck/should_fail/TcCoercibleFail2.hs
Haskell
bsd-3-clause
115
module Main (main) where import Data.Bits {- Do some bitwise operations on some large numbers. These number are designed so that they are likely to exercise all the interesting split-up cases for implementations that implement Integer as some sort of sequence of roughly word-sized values. They are essentially random...
urbanslug/ghc
testsuite/tests/lib/integer/integerBits.hs
Haskell
bsd-3-clause
8,148
-- #hide, prune, ignore-exports module A where
siddhanathan/ghc
testsuite/tests/haddock/should_compile_noflag_haddock/haddockC017.hs
Haskell
bsd-3-clause
47
{-# LANGUAGE CPP, TupleSections, LambdaCase, RecordWildCards, OverloadedLists, OverloadedStrings, FlexibleContexts, RankNTypes, ScopedTypeVariables, ViewPatterns, MultiWayIf #-} #include "ghc-compat.h" module HsToCoq.ConvertHaskell.Expr ( convertTypedModuleBindin...
antalsz/hs-to-coq
src/lib/HsToCoq/ConvertHaskell/Expr.hs
Haskell
mit
60,967
module Handler.Quizcreator where import Assets (unsignedProcentField, unsignedIntField, maybeInt, maybeDouble, encodeExamAttributes, titleTextField, noSpacesTextField, getAllExams) import Data.Text (splitOn) import Data.List.Split (chunksOf) import Data.List (cycle) import Import import ...
cirquit/quizlearner
quizlearner/Handler/Quizcreator.hs
Haskell
mit
7,317
module Handler.Home where import Import import Data.Maybe import Yesod.Auth getHomeR :: Handler Html getHomeR = do loggedIn <- isJust <$> maybeAuthId defaultLayout $ do setTitle "Home - Word Guesser" $(widgetFile "home")
dphilipson/word_guesser_web
Handler/Home.hs
Haskell
mit
247
module Lexer where import Text.Parsec.String (Parser) import Text.Parsec.Language (emptyDef) import Text.Parsec.Prim (many) import qualified Text.Parsec.Token as Tok lexer :: Tok.TokenParser () lexer = Tok.makeTokenParser style where ops = ["+","*","-","/",";","=",",","<",">","|",":"] names = ["def","exter...
TorosFanny/kaleidoscope
src/chapter6/Lexer.hs
Haskell
mit
959
module Main where import LI11718 import qualified Tarefa3_2017li1g180 as T3 import System.Environment import Text.Read main = do args <- getArgs case args of ["movimenta"] -> do str <- getContents let params = readMaybe str case params of Nothing ->...
hpacheco/HAAP
examples/plab/svn/2017li1g180/src/RunT3.hs
Haskell
mit
531
module Feature.Article.PG where import ClassyPrelude import Feature.Article.Types import Feature.Auth.Types import Feature.Common.Types import Platform.PG import Database.PostgreSQL.Simple.SqlQQ import Database.PostgreSQL.Simple import Database.PostgreSQL.Simple.Types addArticle :: PG r m => UserId -> CreateArticle -...
eckyputrady/haskell-scotty-realworld-example-app
src/Feature/Article/PG.hs
Haskell
mit
5,884
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.XAttrProtos.SetXAttrResponseProto (SetXAttrResponseProto(..)) where import Prelude ((+), (/)) import qualified Prelude as Prelude' import qualified Dat...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/XAttrProtos/SetXAttrResponseProto.hs
Haskell
mit
2,810
----------------------------------------------------------------------------- -- -- Module : SGC.Object.Internal.Generic -- Copyright : -- License : MIT -- -- Maintainer : -- Stability : -- Portability : -- -- | -- -- {-# OPTIONS_GHC -fprint-explicit-kinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUA...
fehu/hsgc
SGC/Object/Internal/Generic.hs
Haskell
mit
10,150
{-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE TypeOperators #-} {-| Handles the "Language.LSP.T...
alanz/haskell-lsp
lsp-types/src/Language/LSP/VFS.hs
Haskell
mit
16,541
{- Copyright (C) 2014 Calvin Beck Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, ...
Chobbes/SurvivalPlot
SurvivalPlot/Parser.hs
Haskell
mit
6,096
{-# LANGUAGE OverloadedStrings #-} module Main where import Web.Scotty -- Bare main :: IO () main = scotty 3000 $ do get "/" $ text "Hello Haskeller on Heroku with Stackage!"
yogeshsajanikar/heroku-haskell-stackage-tutorial
src/Main.hs
Haskell
mit
180
module Main where import qualified Data.Map as M import Morse import Test.QuickCheck allowedChars :: String allowedChars = M.keys letterToMorse allowedMorse :: [Morse] allowedMorse = M.elems letterToMorse charGen :: Gen Char charGen = elements allowedChars morseGen :: Gen Morse morseGen ...
deciduously/Haskell-First-Principles-Exercises
4-Getting real/14-Testing/code/morse/tests/tests.hs
Haskell
mit
536
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module JsonSettings where import Data.Yaml import Data.Aeson import qualified Data.ByteString.Lazy as BS import Data.Functor jsonSettingsMain :: IO () jsonSettingsMain = do s <- either (error.show) id <$> decodeFileEither "gipeda.yaml" let o = object [ "set...
nomeata/gipeda
src/JsonSettings.hs
Haskell
mit
382
module GHCJS.DOM.SQLError ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/SQLError.hs
Haskell
mit
38
module Cenary.Crypto.Keccak where import Crypto.Hash (Digest, Keccak_256, hash) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BS8 import Data.Monoid ((<>)) import Text.Read (readMaybe) keccak256 :: (Read b, Num b) => String -> Maybe b keccak256 = readMa...
yigitozkavci/ivy
src/Cenary/Crypto/Keccak.hs
Haskell
mit
540
module Main where import Prelude hiding (getContents, putStr) import Data.Fortran.Unformatted (fromUnformatted) import Data.ByteString.Lazy (getContents, putStr) import Control.Monad (liftM) main :: IO () main = liftM fromUnformatted getContents >>= putStr
albertov/funformatted
Main.hs
Haskell
mit
259
data Expr = Val Int | Div eval :: Expr -> Int eval (Val n) = n eval (`Div` x y) = eval x / eval y safediv :: Int -> Int -> Maybe Int safediv n m = if m == 0 then Nothing else Just (n / m)
ChristopherElliott/Portfolio
haskell/src/utility.hs
Haskell
mit
249
{-# LANGUAGE ViewPatterns #-} module Data.MemoizingTable where {-- Captures the idea that you get information on your data sets incrementally. So you start with the known lookups, add the ones you don't know yet, refine those, then add the refined lookups to the known sets. --} import Prelude hiding (init) import C...
geophf/1HaskellADay
exercises/HAD/Data/MemoizingTable.hs
Haskell
mit
2,106
module Render.Setup where import Data.IORef ( IORef, newIORef ) import Foreign ( newArray ) import Graphics.UI.GLUT hiding (Sphere, Plane) import Geometry.Object import Render.Antialias data State = State { zoomFactor :: IORef GLfloat } type Image = PixelData (Color3 GLfloat) fstSphere :: Surface fstSphere = Sphere ...
dongy7/raytracer
src/Render/Setup.hs
Haskell
mit
1,970
module Search ( search , searchComplex , searchProxim ) where import qualified Data.ByteString.Char8 as B import qualified Data.Text as T import qualified Postings as PS import Control.Monad.Free import Data.Maybe (fromMaybe) import Data.Text.Encoding...
jagg/search
src/Search.hs
Haskell
apache-2.0
2,975
{-# LANGUAGE OverloadedStrings #-} module Forms.Post where import Model.CoreTypes import Data.Time import Text.Blaze.Html (Html) import Text.Digestive hiding (Post) import Text.Digestive.Bootstrap postForm :: Monad m => UTCTime -> Form Html m Post postForm now = Post <$> "title" .: text Nothing <*> "dat...
julienchurch/julienchurch.com
app/Forms/Post.hs
Haskell
apache-2.0
780
module Example.SingleCounter where import Control.Monad import Control.Monad.Crdt import Control.Monad.Reader import Data.Crdt.Counter action :: Crdt Counter () action = do Counter c <- ask when (c < 10) $ do update $ CounterUpdate 1 action main = putStrLn $ unlines $ fmap (show . runCrdt action . Counte...
edofic/crdt
src/Example/SingleCounter.hs
Haskell
apache-2.0
331
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} module Tersus.Cluster.TersusService where -- | TersusService -- Contains all the functions and datatypes that control a server side Tersus Application -- Author: Ernesto Rodriguez import Prelude import Control.Distributed.Process import Control.Monad.IO....
kmels/tersus
Tersus/Cluster/TersusService.hs
Haskell
bsd-2-clause
10,769
{- Copyright (c) 2008, Scott E. Dillard. All rights reserved. -} {-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE ScopedTypeVariable...
sedillard/Vec
Data/Vec/Nat.hs
Haskell
bsd-2-clause
1,798
module Emulator.Video.Util where import Emulator.Memory import Emulator.Types import Control.Monad.IO.Class import Data.Array.IArray import Data.Bits import Graphics.Rendering.OpenGL import Utilities.Parser.TemplateHaskell data ScreenObj = BG [Tile] Priority Layer | Sprite [Tile] Priority | Hidden deriving (...
intolerable/GroupProject
src/Emulator/Video/Util.hs
Haskell
bsd-2-clause
5,315
module TinyASM.ByteCode ( ByteCode(..), size, compileByteCode ) where import Text.Printf (printf) data ByteCode = BC1 Int | BC2 Int Int | BC3 Int Int Int | BC4 Int Int Int Int instance Show ByteCode where show (BC1 op) = "ByteCode " ++ (showHex op) show (BC2 ...
ocus/TinyASM_Haskell
library/TinyASM/ByteCode.hs
Haskell
bsd-3-clause
877
{- Copyright (c) 2013, Genome Research Limited Author: Nicholas Clarke <nicholas.clarke@sanger.ac.uk> -} module Hgc.Mount ( mkMountPoint , mkFstabEntry , mount , umount , SLM.MountFlag(..) , Mount (..) ) where import System.Log.Logger import System.Directory (canonicalizePath , doesFileExist ...
wtsi-hgi/hgc-tools
Hgc/Mount.hs
Haskell
bsd-3-clause
2,815
-- tape something something something module Tape where import Zipper type Tape = Zipper Integer alterReg :: (Integer -> Integer) -> Tape -> Tape alterReg f tape = replace (f (readReg tape)) tape incrReg :: Tape -> Tape incrReg t = alterReg incr t where incr :: Integer -> Integer incr n = n + 1 decrReg :...
rodneyp290/Brainfunc
src/Tape.hs
Haskell
bsd-3-clause
895
{-#LANGUAGE BangPatterns #-} module Main where import Control.Foldl (Fold(..),FoldM(..)) import qualified Control.Foldl as L import qualified Control.FoldM as M import Pipes import qualified Pipes.Prelude as P import qualified Data.Vector.Unboxed as V -- import qualified Data.Vector.Generic as VG -- import qualified Da...
michaelt/foldm
benchmarks/Bench.hs
Haskell
bsd-3-clause
10,913
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE TupleSections #-} -- -- | Copy all arguments to a function in to variables which are named the same -- as the function's parameters. This is known as Grail Normal Form [1] and -- is the ANF equivalent of phi-elimination on SSA. -- -- 1. Grail...
jystic/river
src/River/Core/Transform/Grail.hs
Haskell
bsd-3-clause
2,817
module Main where import AminoAcid (HydratedAminoAcid) import AminoAcidPDB (pdbAminoParser) import qualified Data.Text.IO as TIO (readFile) import System.Environment (getArgs) import Text.Parsec (parse) main :: IO () main = do args <- getArgs con...
mosigo/haskell-sandbox
app/AminoParser.hs
Haskell
bsd-3-clause
649
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE TypeFamilies #-} module LA.Instances () where import Data.Vector.Fixed import LA.Algebra import Prelude hiding (foldl, zipWith, map, replicate) instance (Additive a, Vector v a) => Additive (v a) where add = zipWith add ;...
chalmers-kandidat14/LA
LA/Instances.hs
Haskell
bsd-3-clause
870
module Clean where import Data.List.Split import System.FilePath.Glob import System.FilePath.Posix import Data.List (intercalate) import Control.Applicative import Control.Concurrent import Control.Monad import Data.Monoid import Data.Maybe import ID3.Simple import System import Data.Rated import Util data MetaData...
jb55/hmetadata
Clean.hs
Haskell
bsd-3-clause
2,302
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main...
anchor/purescript-ui-sandbox
server/Main.hs
Haskell
bsd-3-clause
6,265
module Main where import Control.Exception import Control.Monad import System.FilePath import System.Directory import System.Process import Control.Concurrent import Data.List.Split import qualified Data.HashTable.IO as H import qualified Data.ByteString.Lazy as L import Data.Time.Clock import qualified Codec.Archive....
scslab/appdeploy
src/appdeployer.hs
Haskell
bsd-3-clause
4,973
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module TCRError where import Control.Monad.Reader import Control.Monad.Error import Database.TokyoCabinet ( TCM , runTCM , new , OpenMode(..) , TCDB , HDB , BDB , FDB ) import Database.TokyoCabinet.Storable import qualified Databas...
tom-lpsd/tokyocabinet-haskell
examples/TCRError.hs
Haskell
bsd-3-clause
1,773
-- Copyright (c) 2016-present, Facebook, Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.O...
rfranek/duckling
tests/Duckling/Ordinal/RU/Tests.hs
Haskell
bsd-3-clause
600
module EFA.Example.Topology.LinearTwo where import EFA.Application.Utility ( topologyFromEdges ) import qualified EFA.Graph.Topology.Node as Node import qualified EFA.Graph.Topology as Topo import qualified EFA.Report.Format as Format data Node = Source | Crossing | Sink deriving (Eq, Ord, Enum, Show) node0, node...
energyflowanalysis/efa-2.1
src/EFA/Example/Topology/LinearTwo.hs
Haskell
bsd-3-clause
839
module SkeletonTemplates.IUnzipFilter2D ( iunzipFilter2DActor ) where import AstMappings import qualified AbsCAL as C import qualified AbsRIPL as R import Debug.Trace import SkeletonTemplates.CalTypes import Types iunzipFilter2DActor :: String -> Dimension -> R.AnonFun -> R.AnonFun -> C.Type -> C.Type -> C.Actor ...
robstewart57/ripl
src/SkeletonTemplates/IUnzipFilter2D.hs
Haskell
bsd-3-clause
38,100
{-| Module : Types Description : Type information, used internally by Obsídian. Copyright : (c) Joel Svensson, 2014 License : BSD Maintainer : bo.joel.svensson@gmail.com Stability : experimental -} module Obsidian.Types where --------------------------------------------------------------------------- ...
svenssonjoel/ObsidianGFX
Obsidian/Types.hs
Haskell
bsd-3-clause
1,157
module Main where import HTIG main :: IO () main = htig defaultConfig
nakamuray/htig
htig.hs
Haskell
bsd-3-clause
72
{-# LANGUAGE LiberalTypeSynonyms #-} {-# LANGUAGE RankNTypes #-} module Htn where import qualified Data.Map as M import Data.List (find, null, (\\)) class (Eq a, Ord a, Show a) => Term a class (Eq a, Ord a, Show a) => PrimitiveTask a class (Eq a, Ord a, Show a) => CompoundTask a data Task a b = Primitive a ...
y-kamiya/ai-samples
src/Htn.hs
Haskell
bsd-3-clause
2,970
{-# LANGUAGE DefaultSignatures #-} module Mahjong.Class where import Foreign.C.Types -- | Tile describes the properties of a tile. class Tile a where suit :: a -> Bool suit = not . honor honor :: a -> Bool simple :: a -> Bool simple = not . terminal terminal :: a -> Bool default terminal :: (Eq a, ...
TakSuyu/mahjong
src/Mahjong/Class.hs
Haskell
mit
2,511
{-# OPTIONS_HADDOCK hide, prune #-} module Handler.Mooc.FAQ ( getFAQR ) where import Import getFAQR :: Handler Html getFAQR = fullLayout Nothing "Frequently Asked Questions" $ do setTitle "Qua-kit: FAQ" toWidgetBody $ [hamlet| <div class="row"> <div class="col-lg-8 c...
achirkin/qua-kit
apps/hs/qua-server/src/Handler/Mooc/FAQ.hs
Haskell
mit
22,855
{-# LANGUAGE JavaScriptFFI #-} import qualified GHCJS.Foreign as F import GHCJS.Types import GHCJS.Marshal import GHCJS.Foreign (ToJSString(..), FromJSString(..), newObj, toJSBool, jsNull, jsFalse, jsTrue, mvarRef) import Control.Concurrent (threadDelay) import JavaScript.JQuery import JavaScript.JQuery.Internal impor...
MichaelBaker/sartorial-client
vendor/sartorial-server/vendor/sartorial-client/src/Main.hs
Haskell
mit
1,870
import X ( #if !defined(TESTING) X #else X(..) #endif -- f , f -- g , g , h ) import Y
itchyny/vim-haskell-indent
test/module/import_comma_first.in.hs
Haskell
mit
100
import Criterion.Main import Control.Monad.MWC import Control.Monad.Reader main :: IO () main = do gen <- createSystemRandom let wrap name f size = bench name $ whnfIO $ replicateM_ 10000 $ runReaderT (f size) gen defaultMain $ flip map [10, 100, 1000, 10000] $ \size -> bgroup (show...
bitemyapp/snoy-extra
bench/mwc-bytestring.hs
Haskell
mit
475
<?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>Python Scripting</title> <maps> <homeID>top</homeID> <mapref location="...
veggiespam/zap-extensions
addOns/jython/src/main/javahelp/org/zaproxy/zap/extension/jython/resources/help_hu_HU/helpset_hu_HU.hs
Haskell
apache-2.0
964
{- | Module : Mongo.Pid.Removal Description : Get Pid from Name Copyright : (c) Plow Technology 2014 License : MIT Maintainer : brent.phillips@plowtech.net Stability : unstable Portability : portable <Uses a name to grab the pid to remove old pid alarms from mongo> -} {-# LANGUAGE OverloadedStrin...
plow-technologies/mongo-pid-removal
src/RemovalMain_flymake.hs
Haskell
bsd-3-clause
550
module Typed( typed, testPropertyI, testPropertyD, testPropertyZ, testPropertyDZ, immutableVector, immutableMatrix, ) where import Data.Complex( Complex ) import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck import Numeric.LinearAlgebra.Ve...
patperry/hs-linear-algebra
tests/Typed.hs
Haskell
bsd-3-clause
1,420
import Sound.Pd import Control.Concurrent import Control.Monad import Linear.Extra main :: IO () main = withPd $ \pd -> do p1 <- makePatch pd "test/world" forM_ (pdSources pd) $ \sourceID -> alSourcePosition sourceID ((V3 0 0 0) :: V3 Double) --_ <- forkIO $ forM_ [200,210..1500] $ \freq -> do -- ...
lukexi/pd-haskell
test/test-al.hs
Haskell
bsd-3-clause
750
-------------------------------------------------------------------------------- -- | Provides URL shortening through the bit.ly API {-# LANGUAGE OverloadedStrings #-} module NumberSix.Util.BitLy ( shorten , textAndUrl ) where -------------------------------------------------------------------------------...
itkovian/number-six
src/NumberSix/Util/BitLy.hs
Haskell
bsd-3-clause
1,559
{-# LANGUAGE ScopedTypeVariables #-} -- You can set the following VERBOSE environment variable to control -- the verbosity of the output generated by this module. module PackageTests.PackageTester ( PackageSpec(..) , Success(..) , Result(..) -- * Running cabal commands , cabal_configure , caba...
corngood/cabal
Cabal/tests/PackageTests/PackageTester.hs
Haskell
bsd-3-clause
10,883
{-# LANGUAGE PackageImports #-} module Test17388 where import "base" Prelude import {-# Source #-} Foo.Bar import {-# SOURCE #-} "base" Data.Data import {-# SOURCE #-} qualified "base" Data.Data
sdiehl/ghc
testsuite/tests/ghc-api/annotations/Test17388.hs
Haskell
bsd-3-clause
203
import System.Exit (ExitCode(..), exitWith) import System.Posix.Process import System.Posix.Signals main = do test1 test2 test3 test4 putStrLn "I'm happy." test1 = do -- Force SIGFPE exceptions to not be ignored. Under some -- circumstances this test will be run with ...
jimenezrick/unix
tests/libposix/posix004.hs
Haskell
bsd-3-clause
1,565
module Goo (poop) where class Zog a where zoom :: a -> Int -- Assume the relevant behavior for the method. {-@ zoom :: (Zog a) => a -> Nat @-} -- Uses the behavior of `zoom` {-@ poop :: (Zog a) => a -> Nat @-} poop x = zoom x
mightymoose/liquidhaskell
tests/pos/tyclass0.hs
Haskell
bsd-3-clause
231
{-# LANGUAGE ScopedTypeVariables #-} -- !!! Error messages with scoped type variables module Foo where data Set a = Set a unionSetB :: Eq a => Set a -> Set a -> Set a unionSetB (s1 :: Set a) s2 = unionSets s1 s2 where unionSets :: Eq a => Set a -> Set a -> Set a unionSets a b = a {- In GHC 4.04 this gave t...
ryantm/ghc
testsuite/tests/rename/should_fail/rnfail020.hs
Haskell
bsd-3-clause
492
-- !!! an example Simon made up -- module ShouldSucceed where f x = (x+1, x<3, g True, g 'c') where g y = if x>2 then [] else [y] {- Here the type-check of g will yield an LIE with an Ord dict for x. g still has type forall a. a -> [a]. The dictionary is free, bound by the x. It should be ok to add the signature:...
urbanslug/ghc
testsuite/tests/typecheck/should_compile/tc081.hs
Haskell
bsd-3-clause
588
{-# LANGUAGE ParallelArrays #-} {-# OPTIONS -fvectorise #-} module Types ( Point, Line, points, xsOf, ysOf) where import Data.Array.Parallel import Data.Array.Parallel.Prelude.Double type Point = (Double, Double) type Line = (Point, Point) points' :: [:Double:] -> [:Double:] -> [:Point:] points' = zipP points :: ...
urbanslug/ghc
testsuite/tests/dph/quickhull/Types.hs
Haskell
bsd-3-clause
810
module Main where import C main = print ("hello world" ++ show (f 42))
ghc-android/ghc
testsuite/tests/ghci/prog002/D.hs
Haskell
bsd-3-clause
73
{-# LANGUAGE LambdaCase #-} module Oden.Core.Expr where import Oden.Core.Foreign import Oden.Identifier import Oden.Metadata import Oden.SourceInfo data NameBinding = NameBinding (Metadata SourceInfo) Identifier deriving (Show, Eq, Ord) data FieldInitializer e...
oden-lang/oden
src/Oden/Core/Expr.hs
Haskell
mit
5,972
thousands = [y | z <- [1..1000], y <- [[x, yy, z] | yy <- [1..1000], let x = (1000 - yy - z), x > 0, x < yy, yy < z] ] isTriplet :: [Int] -> Bool isTriplet xs = a^2 + b^2 == c^2 where a = head xs b = xs !! 1 c = xs !! 2 problem9 = product $ head [x | x <- thousands, isTriplet x]
danhaller/euler-haskell
9.hs
Haskell
mit
318
{-# LANGUAGE NoMonomorphismRestriction #-} import Diagrams.Prelude import Diagrams.Backend.SVG.CmdLine c1 = circle 0.5 # fc steelblue c2 = circle 1 # fc orange diagram :: Diagram B diagram = beside (1 ^& 1) c1 c2 # showOrigin main = mainWith $ frame 0.1 diagram
jeffreyrosenbluth/NYC-meetup
meetup/Atop6.hs
Haskell
mit
268
mpow :: Int -> Float -> Float mpow 0 _ = 1 mpow n f = f * (mpow (n-1) f) main = print (mpow 50 0.5)
lucas8/MPSI
ipt/recursive/misc/pow.hs
Haskell
mit
103
module ChatCore.ChatLog.File ( LogFileId (..) , logFileForDate , dayForLogFile , logFileForToday , logFileForLine , logFileName , parseLogFileId , logFilesInDir , ChatLogLine (..) ) where import Control.Applicative import Control.Error import Data.Time import System.Director...
Forkk/ChatCore
ChatCore/ChatLog/File.hs
Haskell
mit
2,186
{-# LANGUAGE LambdaCase #-} module Main where import qualified $module$ import Control.Applicative import Control.Monad import Control.Concurrent.Timeout import Data.Time.Clock.POSIX import Data.Timeout import System.IO import Text.Printf import Language.Haskell.Liquid.Types (GhcSpec) import Test.Target import Test....
gridaphobe/target
bin/CheckFun.template.hs
Haskell
mit
1,970
module Codecs.QuickCheck where import Data.Monoid ((<>)) import Test.Tasty import Test.QuickCheck import Test.QuickCheck.Arbitrary import Test.QuickCheck.Monadic import Data.Scientific as S import Data.Time import Text.Printf import Data.List as L import Data.UUID (UUID, fromWords) import Data.String (IsString) impor...
postgres-haskell/postgres-wire
tests/Codecs/QuickCheck.hs
Haskell
mit
7,070
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} -- | Defines an Postgresql event store. module Eventful.Store.Postgresql ( postgresqlEventStoreWriter , module Eventful.Store.Class , module Eventful.Store.Sql ) where import Control.Monad.Reader import Data.Monoid ((<>)) import Data.Text (Text...
jdreaver/eventful
eventful-postgresql/src/Eventful/Store/Postgresql.hs
Haskell
mit
2,018
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.MediaError (pattern MEDIA_ERR_ABORTED, pattern MEDIA_ERR_NETWORK, pattern MEDIA_ERR_DECODE, pattern MEDIA_ERR_SRC_NOT_SUPPORTED, pattern MEDIA_ERR_ENCRYPTED, js_getCode, getCode, MediaError,...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/MediaError.hs
Haskell
mit
1,580
import GHC.RTS.Events analyze path analysis = do logread <- readEventLogFromFile path print (do log <- logread return $ analysis log) isTrace (Event t i) = case i of (UserMessage x) -> True _ -> False dfilter f = foldr ((++) . rfilter) [] where ...
patrickboe/artery
Analysis/Trace.hs
Haskell
mit
603
module Rebase.Data.Text.IO ( module Data.Text.IO ) where import Data.Text.IO
nikita-volkov/rebase
library/Rebase/Data/Text/IO.hs
Haskell
mit
80
module Eval where import Control.Monad.Error import Types eval :: LispVal -> ThrowsError LispVal eval val@(String _) = return val eval val@(Char _) = return val eval val@(Number _) = return val eval val@(Float _) = return val eval val@(Bool _) = return val eval (List [Atom "quote", val]) = return val eval (List (Atom ...
dstruthers/WYAS
Eval.hs
Haskell
mit
2,148
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ConstraintKinds #-} module App where import BasePrelude hiding (first) imp...
benkolera/talk-stacking-your-monads
code-classy/src/App.hs
Haskell
mit
1,163
{-# LANGUAGE OverloadedStrings #-} module Jolly.Parser ( runParseModule ) where import qualified Data.Text.Lazy as TL import Text.Megaparsec import Text.Megaparsec.Char import qualified Text.Megaparsec.Char.Lexer as L import Text.Megaparsec.Expr import Jolly.Sy...
jchildren/jolly
src/Jolly/Parser.hs
Haskell
mit
3,014
{-# LANGUAGE NoImplicitPrelude #-} module Chapter14 where import Chapter8 (recMul) import Control.Monad (mapM_, return) import Data.Bool (Bool(False, True), (&&), (||)) import Data.Char (toUpper) import Data.Eq (Eq, (==), (/=)) import Data.Foldable (concat, foldr) import Data.Function (id) import Data.Functor (fmap) ...
Numberartificial/workflow
haskell-first-principles/haskell-programming-from-first-principles-master/src/Chapter14.hs
Haskell
mit
16,922
ans :: [[Int]] -> [Int] ans ([0]:_) = [] ans ([k]:l:xs) = let d = k - 1 a = sum l in (a`div`d):ans xs main = do c <- getContents let i = map (map read) $ map words $ lines c :: [[Int]] o = ans i mapM_ print o
a143753/AOJ
1027.hs
Haskell
apache-2.0
287
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QDial.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:15 Warning : this file is machine generated - do not mod...
uduki/hsQt
Qtc/Gui/QDial.hs
Haskell
bsd-2-clause
45,334
{-# LANGUAGE OverloadedStrings #-} module Config (AppConfig(..), config, defaultConfig) where import qualified Data.Configurator as C import Data.Configurator.Types import Control.Exception (catch) import Data.Text (unpack) import Options data AppOptions = AppOptions { configPath :: String } data AppCo...
lolepezy/rpki-pub-server
src/Config.hs
Haskell
bsd-2-clause
2,204
module Raven.ParserSpec ( spec ) where import Test.Tasty.Hspec import Test.QuickCheck import Test.Hspec.Megaparsec import Text.Megaparsec hiding (parse, string) import Raven.Types import Raven.Parser spec :: Spec spec = describe "Parser" $ do describe "parsing bools" $ do it "should be able to parse true ...
luc-tielen/raven
test/Raven/ParserSpec.hs
Haskell
bsd-3-clause
20,712
module Main where import qualified System.IO.Streams.Tests.Attoparsec.ByteString as AttoparsecByteString import qualified System.IO.Streams.Tests.Attoparsec.Text as AttoparsecText import qualified System.IO.Streams.Tests.Builder as Builder import qualified System.IO.Streams.Tests.ByteString ...
LukeHoersten/io-streams
test/TestSuite.hs
Haskell
bsd-3-clause
2,344
{-# LANGUAGE DataKinds, FlexibleContexts, TemplateHaskell #-} -- | Demonstration of streaming data processing. Try building with -- cabal (@cabal build benchdemo@), then running in bash with -- something like, -- -- @$ /usr/bin/time -l dist/build/benchdemo/benchdemo 2>&1 | head -n 4@ import qualified Control.Foldl as F...
codygman/Frames
benchmarks/BenchDemo.hs
Haskell
bsd-3-clause
718
{-# LANGUAGE TemplateHaskell, LambdaCase, FlexibleContexts, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module Jugendstil.Doc.Layout ( Layout(..) , matchLayout , computeStyle , Document , renderDocument , rows , columns , docs , margin -- * DoList , DoList , unDoList , (==>) , rowsD...
fumieval/jugendstil
src/Jugendstil/Doc/Layout.hs
Haskell
bsd-3-clause
3,806
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module Aria.Pass where import Happstack.ClientSession import Control.Lens import Datat.Data import Data.SafeCopy (base, deriveSafeCopy) import Control.Monad.Catch import Control.Monad...
theNerd247/ariaRacer
arweb/app/Aria/Pass.hs
Haskell
bsd-3-clause
1,507
-- | This module defines a sever-side handler that lets you serve static files. -- -- - 'serveDirectory' lets you serve anything that lives under a particular -- directory on your filesystem. module Servant.Utils.StaticFiles ( serveDirectory, ) where import Filesystem.Path.CurrentOS (decodeString) import Network....
derekelkins/servant-server
src/Servant/Utils/StaticFiles.hs
Haskell
bsd-3-clause
1,346