code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} module Control.Monad.Takahashi.Slide ( BlockOption(..) , fontColor, bgColor, frameColor, frameStyle , SlideOption(..) , slideTitle, slideFontSize, titleOption, codeOption , contentsOption, contentsOption2, annotationOption, b...
tokiwoousaka/takahashi
src/Control/Monad/Takahashi/Slide.hs
mit
1,995
0
14
368
571
303
268
-1
-1
{-# LANGUAGE FlexibleInstances #-} module Tests.Command.Dupes (tests) where import Dupes import Control.Applicative import Data.Machine import Data.Serialize import qualified Data.ByteString.Char8 as C import Test.Framework import Test.Framework.Providers.QuickCheck2 (testProperty) import Test.QuickCheck instance ...
danstiner/clod
test/Tests/Command/Dupes.hs
mit
2,057
0
11
380
672
365
307
47
4
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Consensus.Configuration -- Copyright : (c) Phil Hargett 2014 -- License : MIT (see LICENSE file) -- -- Maintainer : phil@haphazardhou...
hargettp/raft
src/Control/Consensus/Configuration.hs
mit
6,626
0
10
990
1,030
565
465
78
2
{-# LANGUAGE OverloadedLists #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE TupleSections #-} module Examples.AES where import Circuit import Circuit.Builder import Circuit.Utils import qualified Circuit.Format.Acirc as Acirc import qualified Circuit.Format.Acirc2 as Acirc2 import Control.Monad import Control.Mo...
spaceships/circuit-synthesis
src/Examples/AES.hs
mit
22,206
1
19
6,014
9,261
5,811
3,450
403
4
-- | Functions to facilitate automated and manual testing. module Text.Docvim.Util ( compileUnits , p , parseUnit , pm , pp , ppm , ppv , pv ...
wincent/docvim
lib/Text/Docvim/Util.hs
mit
2,139
0
8
569
420
227
193
39
2
module Phone (number) where import Data.Char (isDigit) number :: String -> Maybe String number = validate . filter isDigit where validate :: String -> Maybe String validate s | n == 10 && h /= '1' && c `elem` ['2' .. '9'] = Just s | n == 11 && h == '1' = validate $ tail s | otherwise ...
genos/online_problems
exercism/haskell/phone-number/src/Phone.hs
mit
394
0
14
134
166
85
81
11
1
import Text.Printf main = do line <- getLine putStrLn $ printf "%.2f" $ abs (read line :: Double)
Voleking/ICPC
references/aoapc-book/BeginningAlgorithmContests/haskell/ch1/ex1-8.hs
mit
104
0
10
24
44
21
23
4
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.WebGPUFunction (getName, WebGPUFunction(..), gTypeWebGPUFunction) where import Prelude ((.), (==), (>>=), return,...
ghcjs/jsaddle-dom
src/JSDOM/Generated/WebGPUFunction.hs
mit
1,287
0
10
146
351
227
124
21
1
module Unison.Util.List where import Unison.Prelude import qualified Data.List as List import qualified Data.Set as Set import qualified Data.Map as Map multimap :: Foldable f => Ord k => f (k, v) -> Map k [v] multimap kvs = -- preserve the order of the values from the original list reverse <$> foldl' step Map.e...
unisonweb/platform
unison-core/src/Unison/Util/List.hs
mit
2,260
0
15
565
983
518
465
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-glue-trigger-condition.html module Stratosphere.ResourceProperties.GlueTriggerCondition where import Stratos...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/GlueTriggerCondition.hs
mit
2,281
0
12
253
355
202
153
32
1
-- | Parsers for first-order logic and other important structures (e.g. Markov -- logic networks). module Faun.Parser.Term ( parseFunForm, parseTerm ) where import Data.Char (isLower) import qualified Data.Text as T import Text.Parsec import Text.Parsec.String (Parser) import Faun.Parser.Core import Faun.Term -- ...
PhDP/Sphinx-AI
Faun/Parser/Term.hs
mit
863
0
12
148
230
125
105
24
2
{- | Module : Main Description : Implementation of Problem 12 from 99 Questions. Copyright : (c) Jeff Smits License : MIT Maintainer : [email protected] Stability : experimental Portability : portable Decode a run-length encoded list. Given a run-length code list generated as specified in pro...
Apanatshka/99-questions
P12.hs
mit
1,131
0
12
231
293
151
142
10
1
----------------------------------------------------------------------------- -- | -- Module : Mezzo.Model.Harmony.Chords -- Description : Models of chords -- Copyright : (c) Dima Szamozvancev -- License : MIT -- -- Maintainer : [email protected] -- Stability : experimental -- Portability : portable...
DimaSamoz/mezzo
src/Mezzo/Model/Harmony/Chords.hs
mit
12,720
0
16
3,154
4,451
2,364
2,087
-1
-1
type Name = String type Age = Int type Breed = String type Color = String data Doggy = Dog Name Breed Age Color deriving Show data Who = Person Name Age deriving Show data Soumya = Who | Doggy deriving Show data A = B Int | C String deriving Show data D = E Int | F String | D deriving Show data HouseholdMemb...
soumyadsanyal/99
ch03/soumya.hs
gpl-2.0
4,980
0
14
1,253
2,491
1,279
1,212
210
4
module Html.GenHtml where import Test.QuickCheck import Control.Applicative import Data.List import Html.ShowHtml import Html.HtmlNode instance Arbitrary HtmlNode where arbitrary = sized $ arbNode flowNodes [] arbNode :: [NodeName] -> [NodeName] -> Int -> Gen HtmlNode arbNode _ _ 0 = Text <$> arbText arbNode allow...
pbevin/toycss
src/html/GenHtml.hs
gpl-2.0
4,044
0
15
828
880
468
412
59
3
{- Copyright 2012, 2013, 2014 Colin Woodbury <[email protected]> This file is part of Aura. Aura is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later ve...
vigoos/Farrago-OS
aura-master/aura-master/src/Aura/Conflicts.hs
gpl-2.0
2,584
0
11
591
445
226
219
32
2
-- PolRepTDA.hs -- Implementación de los polinomios mediante tipos de datos algebraicos. -- José A. Alonso Jiménez https://jaalonso.github.com -- ===================================================================== {-# OPTIONS_GHC -fno-warn-unused-top-binds #-} module Tema_21.PolRepTDA ( Polinomio, polCero, ...
jaalonso/I1M-Cod-Temas
src/Tema_21/PolRepTDA.hs
gpl-2.0
4,853
0
9
1,220
920
498
422
50
1
-- | Module for the 'Monster' type and related functions. 'Monster' -- represents a Sil monster, containing all the information we need -- to simulate attacks by or against the monster. module Monster where import qualified Data.Map as Map import Rdice import Types import Text.Regex.Posix ((=~)) import Control.Applic...
kryft/fsil
Monster.hs
gpl-2.0
5,381
0
12
1,714
748
435
313
60
2
{-# LANGUAGE OverloadedStrings #-} import SequenceFormats.FreqSum (FreqSumEntry(..), readFreqSumStdIn, printFreqSumStdOut, FreqSumHeader(..)) import SequenceFormats.Utils (liftParsingErrors, Chrom(..)) import Control.Applicative (optional) import Control.Monad.Trans.Class (lift) import Data.Char (isSpace) import...
stschiff/rarecoal-tools
src-filterFreqSum/filterFreqSum.hs
gpl-3.0
4,717
0
25
1,247
1,334
697
637
98
7
{-# LANGUAGE NamedFieldPuns #-} {- This module provides the main function perform. See license info at end of file. -} module Git.Pile.PileLib (perform ,Action(MakePileable,RunGitCommand) ,Recursiveness(Recursive,NonRecursive)) where import Git.Pile.Types import Git.Pile.PathConstants import Git.Pile.ReposToWork...
timthelion/git-toggle
Git/Pile/PileLib.hs
gpl-3.0
1,136
0
7
171
99
62
37
18
1
{-# OPTIONS_GHC -XTypeFamilies -XTypeSynonymInstances -XOverloadedStrings -XRecursiveDo -pgmF marxup3 -F #-} module Paper where import MarXup import MarXup.Latex import MarXup.Tex import Data.Monoid import Framework import Data.List import PaperData acmCategories,keywords,abstract,header :: TeX acmCategories = do ...
jyp/ControlledFusion
paper/Paper.hs
gpl-3.0
1,018
17
10
175
250
134
116
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/PlayListItems/Update.hs
mpl-2.0
7,245
0
19
1,612
906
535
371
130
1
-- This module deals with how we represent the imformation that is -- stored in an `.ogz` file. {-# LANGUAGE TemplateHaskell #-} module Types where import HomoTuple import Control.Applicative import Control.DeepSeq import Control.Monad import Data.Binary import Data...
bsummer4/ogz
src/Types.hs
agpl-3.0
13,903
0
17
3,076
3,641
1,909
1,732
-1
-1
{- | Module : $Header$ Description : Solution to problem 2 License : PublicDomain Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... By considering the terms in the Fibonacci sequ...
jhnesk/project-euler
src/Solutions/Problem002.hs
unlicense
526
0
9
108
54
30
24
3
1
module Lux.Core where data Status = Ok | Warning | Critical deriving (Enum, Show) type Description = String type MetricKey = String type MetricValue = Float data Metric = Metric MetricKey MetricValue deriving (Eq, Show) data Response = Response Status Description [Metric] deriving (Show)
doismellburning/lux
src/Lux/Core.hs
apache-2.0
296
4
7
51
97
57
40
11
0
module TestMain where import FRP.Yampa import Game.Games import Game.GameState import Input testMain :: IO() testMain = do -- timeRef <- initializeTimeRef reactimate initAction inputAction actuate wholeGame initAction :: IO Input initAction = return NoInput inputAction :...
no-moree-ria10/utsuEater
app/TestMain.hs
apache-2.0
536
0
10
135
163
81
82
21
1
{-# LANGUAGE DoAndIfThenElse #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies #-} module...
DaMSL/K3
src/Language/K3/Interpreter/Evaluation.hs
apache-2.0
30,705
0
23
7,655
9,890
4,999
4,891
488
69
{- Copyright 2010-2012 Cognimeta Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writ...
Cognimeta/cognimeta-utils
src/Cgm/Control/Monad/State.hs
apache-2.0
5,094
0
19
1,130
1,742
920
822
79
1
{-# Language DataKinds #-} {-# Language StandaloneDeriving #-} module Stackist.Parser (parseExpr, Expr(..), parseJoy) where import Text.ParserCombinators.Parsec hiding (spaces) symbol :: Parser Char symbol = oneOf "!$%&|*+-/:<=>?@^_~#" spaces :: Parser () spaces = skipMany1 space data Expr = Numeric Integer ...
stevej/stackist
src/Stackist/Parser.hs
apache-2.0
1,700
0
11
534
481
242
239
49
3
{-| Copyright : (C) 2012-2016, University of Twente License : BSD2 (see the file LICENSE) Maintainer : Christiaan Baaij <[email protected]> Module that connects all the parts of the CLaSH compiler library -} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module C...
ggreif/clash-compiler
clash-lib/src/CLaSH/Driver.hs
bsd-2-clause
8,862
0
20
2,729
1,964
1,045
919
147
2
module Day2(paperAmount, bowAmount) where import Data.List (sort) import Data.Maybe (fromJust) import Data.Text (pack, splitOn, unpack) paperAmount :: String -> Integer paperAmount xs = sum $ map getPaper (lines xs) getPaper :: String -> Integer getPaper = (+) . minimum . fromJust . s...
samfoy/adventOfCode
src/Day2.hs
bsd-3-clause
1,099
0
12
225
538
287
251
26
1
module ImplicitRefs.Data where import Control.Monad.Except import Data.IORef import qualified Data.Map as M import Data.Maybe (fromMaybe) import qualified Text.Megaparsec as Mega type Environment = M.Map String DenotedValue empty :: Environment empty = M.empty...
li-zhirui/EoplLangs
src/ImplicitRefs/Data.hs
bsd-3-clause
4,969
0
13
1,124
1,779
932
847
129
3
{-# LANGUAGE BangPatterns #-} module SECDH.Types where import Data.Monoid import Data.Map (Map) import qualified Data.Map as Map import Data.Sequence (Seq) import qualified Data.Sequence as Seq import System.IO import Language.Slambda.Types data Instr = TermI { instrTerm :: Term } | ApI Bool -- indicates ...
pgavin/secdh
lib/SECDH/Types.hs
bsd-3-clause
4,127
0
19
1,452
977
537
440
149
0
module Internal.Random ( module Data.Monoid , ($>), (|+|) ) where import Data.Monoid infix 4 $> ($>) :: (Functor f) => f a -> (a -> b) -> f b ($>) = flip fmap infixl 0 |> (|>) = flip ($) infixl 7 |+| (|+|) :: Monoid a => a -> a -> a (|+|) = mappend
pqwy/redex
src/Internal/Random.hs
bsd-3-clause
258
0
9
65
132
80
52
12
1
module Codex.Meetup.M1.NumericalAbstraction.Nat ( fact, fib ) where import Codex.Lib.Church.Nat fact :: Nat -> Nat fact O = (S O) fact s@(S n') = (*) s $ fact n' fib :: Nat -> Nat fib O = O fib (S O) = (S O) fib s = fib ((-) s (succ O)) + fib ((-) s (succ (S O)))
adarqui/Codex
src/Codex/Meetup/M1/NumericalAbstraction/Nat.hs
bsd-3-clause
271
0
12
65
169
92
77
11
1
import Distribution.Simple import System.IO import System.Directory import Data.List import System.Environment main = do --your (x:_) <- getArgs if x == "configure" then do dir <- getAppUserDataDirectory "GiveYouAHead" isE <- doesDirectoryExist dir if isE == True then put...
Qinka/cmd
Setup.hs
bsd-3-clause
1,500
0
16
432
503
264
239
38
5
module Config ( ConfigData(..), ConfigPicker(..), pickerData, getData, getDataFromFile ) where import System.IO.Extra data ConfigPicker = Picker String Integer data ConfigData = Data Integer String pickerData :: [ConfigPicker] pickerData = [ Picker "h...
Xidian-Haskell-Server-Keeper/XHSK-Home
src/Config.hs
bsd-3-clause
1,683
0
12
519
541
274
267
42
2
--------- -- NIM -- --------- module Nim (Nim, nim) where import Game import Graphics.UI.WX hiding (prev) -- import Graphics.UI.WXCore import Tools data Nim = Nim Int deriving (Show, Eq) nim :: Nim nim = undefined instance Game Nim where name _ = "nim" standard _ = Properties { players = 2, boardsize = 21, ...
HJvT/GeBoP
Nim.hs
bsd-3-clause
2,252
0
18
795
742
380
362
39
1
{-# OPTIONS_GHC -Wall #-} module Messages.Strings where import Messages.Types (Message(..)) showFiles :: [FilePath] -> String showFiles = unlines . map ((++) " ") renderMessage :: Message -> String renderMessage ErrorsHeading = "ERRORS" renderMessage ErrorFileLocation = "<location>" renderMessage (FilesWillBeO...
fredcy/elm-format
src/Messages/Strings.hs
bsd-3-clause
1,305
0
8
271
194
107
87
31
1
{-# LANGUAGE KindSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE StandaloneDeriving #-} module GRIN.GrinLiteral where import Data.Text import Data.Data data GrinLiteral = LitInteger Integer | LitFloat Float | LitDouble Double | LitChar Char | LitBool Bool | LitNu...
spacekitteh/libgrin
src/GRIN/GrinLiteral.hs
bsd-3-clause
399
0
6
77
83
50
33
17
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} module Network.Raptr.ServerSpec where import Control.Concurrent.MVar import Control.Concurrent.Queue import Control.Exception import Control.Monad import Data.Binary import Network.Rapt...
capital-match/raptr
test/Network/Raptr/ServerSpec.hs
bsd-3-clause
2,273
0
17
685
556
281
275
51
1
module FP.Monads where import FP.Core --------------------- -- Monadic Effects -- --------------------- -- ID {{{ newtype ID a = ID { runID :: a } deriving ( Eq, Ord , PartialOrder , HasBot , Monoid , JoinLattice ) instance Unit ID where unit = ID instance CUnit Universal ID where cunit = unit in...
davdar/quals
src/FP/Monads.hs
bsd-3-clause
50,076
235
19
11,300
21,077
10,734
10,343
-1
-1
module GameState where import Player hiding (tell,put,get,putS,getS,putC,getC,putCS,getCS) import Data import NameGenerator import Control.Concurrent.STM import Control.Concurrent.Async import Control.Monad.Reader import Control.Monad.State hiding (get, put) import Control.Exception (catch, Exception, throw, throwIO)...
thomasathorne/h-chu
src/GameState.hs
bsd-3-clause
4,509
0
18
1,178
2,047
1,035
1,012
114
2
module Geometry.Sphere (volume, area) where volume :: Float -> Float volume radius = (4.0 / 3.0) * pi * (radius ^ 3) area :: Float -> Float area radius = 4 * pi * (radius ^ 2)
zxl20zxl/learnyouahaskell
Geometry/Sphere.hs
mit
178
0
8
39
85
47
38
5
1
{-# LANGUAGE TemplateHaskell, Rank2Types, FlexibleContexts #-} {-# LANGUAGE FlexibleInstances, FunctionalDependencies #-} module World where import qualified Data.IntMap as IM import Control.Applicative ((<$>)) import Control.Lens import Control.Monad.State import Data.Foldable (foldMap, for_) import Building import ...
skeskinen/neflEFortress
World.hs
mit
7,479
0
23
2,139
2,376
1,190
1,186
-1
-1
-- A fractal consisting of circles and lines which looks a bit like -- the workings of a clock. import Graphics.Gloss main = animate (InWindow "Clock" (600, 600) (20, 20)) black frame -- Build the fractal, scale it so it fits in the window -- and rotate the whole thing as time moves on. frame :: Float -> Picture...
kylegodbey/haskellProject
src/test.hs
mit
1,777
55
14
482
614
339
275
37
3
module Data.Wright.CIE.Illuminant.D55 (d55) where import Data.Wright.Types (Model) import Data.Wright.CIE.Illuminant.Environment (environment) d55 :: Model d55 = environment (0.33242, 0.34743)
fmap/wright
src/Data/Wright/CIE/Illuminant/D55.hs
mit
194
0
6
19
57
37
20
5
1
module Foundation where import Prelude import Yesod import Yesod.Static import Yesod.Auth import Yesod.Auth.BrowserId import Yesod.Default.Config import Yesod.Default.Util (addStaticContentExternal) import Network.HTTP.Client.Conduit (Manager, HasHttpManager (getHttpManager)) import qualified Settings import Settings....
athanclark/Chupacabra
Foundation.hs
mit
6,024
0
18
1,352
864
475
389
-1
-1
-------------------------------------------------------------------------- -- Copyright (c) 2015, ETH Zurich. -- All rights reserved. -- -- This file is distributed under the terms in the attached LICENSE file. -- If you do not find this file, copies can be found by writing to: -- ETH Zurich D-INFK, CAB F.78, Universit...
kishoredbn/barrelfish
hake/ARMv8.hs
mit
7,856
0
21
3,086
1,241
680
561
142
1
{-# LANGUAGE CPP #-} module Main where #define READLINE #if __GLASGOW_HASKELL__ > 602 import Test.HUnit import Test.QuickCheck hiding (test) #else import HUnit import Debug.QuickCheck hiding (test) #endif import Plugin.Pl.Common import Plugin.Pl.Transform import Plugin.Pl.Parser import Plugin.Pl.PrettyPrinter import...
jwiegley/lambdabot-1
Plugin/Pl/Test.hs
mit
8,625
0
17
2,030
2,631
1,393
1,238
207
2
{- Copyright 2015 Markus Ongyerth, Stephan Guenther This file is part of Monky. Monky is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
Ongy/monky
Monky/Version.hs
lgpl-3.0
1,097
0
5
228
38
25
13
5
1
module Main where import Parser import Tokenizer import Data.String.Utils import Text.Parsec main :: IO () main = do c <- getContents case parse mainparser "(stdin)" c of Left e -> do putStrLn "Error parsing input:" print e Right r -> putStrLn $ rstrip $ interpreter ...
andsild/TextToNumber
src/Main.hs
unlicense
325
0
12
101
100
49
51
12
2
<?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="fr-FR"> <title>TLS Debug | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref l...
veggiespam/zap-extensions
addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
971
80
66
160
415
210
205
-1
-1
-- | Renderer that supports rendering to xmlhtml forests. This is a port of -- the Hexpat renderer. -- -- Warning: because this renderer doesn't directly create the output, but -- rather an XML tree representation, it is impossible to render pre-escaped -- text. -- module Text.Blaze.Renderer.XmlHtml (renderHtml, rende...
23Skidoo/xmlhtml
src/Text/Blaze/Renderer/XmlHtml.hs
bsd-3-clause
3,286
0
11
704
895
477
418
55
9
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Control/Concurrent/STM/TVar.hs" #-} {-# LANGUAGE CPP, MagicHash, UnboxedTuples #-} {-# LANGUAGE Trustworthy #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Concurr...
phischu/fragnix
tests/packages/scotty/Control.Concurrent.STM.TVar.hs
bsd-3-clause
1,993
0
11
494
367
200
167
38
1
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, FlexibleInstances #-} -- | If you are interested in the IHaskell library for the purpose of augmenting the IHaskell -- notebook or writing your own display mechanisms and widgets, this module contains all functions -- you need. -- -- In order to create a display mecha...
thomasjm/IHaskell
src/IHaskell/Display.hs
mit
5,582
0
10
1,090
846
502
344
87
1
-- ---------------------------------------------------------------------------- -- | Base LLVM Code Generation module -- -- Contains functions useful through out the code generator. -- module LlvmCodeGen.Base ( LlvmCmmDecl, LlvmBasicBlock, LiveGlobalRegs, LlvmUnresData, LlvmData, UnresLabel, U...
jwiegley/ghc-release
compiler/llvmGen/LlvmCodeGen/Base.hs
gpl-3.0
18,056
0
22
4,132
4,151
2,207
1,944
288
6
{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.Init -- Copyright : (c) Brent Yorgey 2009 -- License : BSD-like -- -- Maintainer : [email protected] -- Stability : provisional -- Portability : portable -- -...
tolysz/prepare-ghcjs
spec-lts8/cabal/cabal-install/Distribution/Client/Init.hs
bsd-3-clause
36,774
0
22
10,729
8,743
4,469
4,274
684
17
{- | Module : $Id$ Description : hybrid logic extension of CASL Stability : experimental This folder contains the files for HybridCASL basic specs * "Hybrid.AS_Hybrid" abstract syntax * "Hybrid.Parse_AS" parser * "Hybrid.HybridSign" signatures * "Hybrid.ATC_Hybrid" * "...
keithodulaigh/Hets
Hybrid.hs
gpl-2.0
453
0
2
111
5
4
1
1
0
<?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="sq-AL"> <title>Directory List v2.3</title> <maps> <homeID>directorylistv2_3</homeID> <m...
thc202/zap-extensions
addOns/directorylistv2_3/src/main/javahelp/help_sq_AL/helpset_sq_AL.hs
apache-2.0
978
78
66
157
412
209
203
-1
-1
<?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="sq-AL"> <title>Sequence Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <ma...
kingthorin/zap-extensions
addOns/sequence/src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help_sq_AL/helpset_sq_AL.hs
apache-2.0
977
78
66
159
413
209
204
-1
-1
{-| Implementation of DataCollectors CLI functions. This module holds the common command-line related functions for the collector binaries. -} {- Copyright (C) 2009, 2010, 2011, 2012 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted prov...
apyrgio/snf-ganeti
src/Ganeti/DataCollectors/CLI.hs
bsd-2-clause
5,402
0
14
1,392
801
473
328
98
1
module TH_abstractFamily where import Language.Haskell.TH -- Empty closed type families are okay... ds1 :: Q [Dec] ds1 = [d| type family F a where |] -- ...but abstract ones should result in a type error ds2 :: Q [Dec] ds2 = [d| type family G a where .. |]
urbanslug/ghc
testsuite/tests/quotes/TH_abstractFamily.hs
bsd-3-clause
260
0
6
52
52
35
17
-1
-1
module Main where import System.Environment import System.Exit import qualified Data.Map as Map import Crosscells.Tokens import Crosscells.Puzzle import Crosscells.Solver main :: IO () main = do name <- getArg file <- readFile name xs <- solvePuzzle (compile (parseTokens file)) mapM_ print (Map.toLi...
glguy/5puzzle
Crosscells.hs
isc
513
0
12
129
164
82
82
20
2
module Platform.JWT where import ClassyPrelude import Data.Has import Jose.Jwk import Crypto.Random.Types (MonadRandom) import System.Environment import qualified Data.Aeson as Aeson data Env = Env { envExpirationSecs :: Integer , envJwks :: [Jwk] } type JWT r m = (MonadReader r m, Has Env r, MonadRandom m, ...
eckyputrady/haskell-scotty-realworld-example-app
src/Platform/JWT.hs
mit
919
0
15
160
279
147
132
25
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} module Render.RichText ( Block(..), Inlines (..), -- LinkTarget (..), space, text, text', parens, -- link, linkRange, linkHole, icon, -- combinators (<+>), punctuate, braces, braces', dbr...
banacorn/agda-language-server
src/Render/RichText.hs
mit
8,930
0
16
1,922
2,454
1,325
1,129
197
9
nwd :: Integer -> Integer -> Integer nwd 0 y = y nwd x 0 = x nwd x y | x >= y = if x`mod`y>y then nwd (x`mod`y) y else nwd y (x`mod`y) | x < y = nwd y x
RAFIRAF/HASKELL
nwdEuMod2.hs
mit
157
0
9
47
118
61
57
6
2
{-# OPTIONS_GHC -fno-warn-type-defaults #-} module LLVM.Codegen.Array ( Order(..), Array(..), arrayType, asArray, arrayPtrC, arrayPtrF, arrayArg, arraySet, arrayGet ) where import Control.Monad import LLVM.Codegen.Builder import LLVM.Codegen.Logic import LLVM.Codegen.Types import LLVM.Codegen.Co...
sdiehl/llvm-codegen
src/LLVM/Codegen/Array.hs
mit
4,284
0
10
1,003
1,143
625
518
89
1
{- - By Yue Wang 14.12.2014 - proj06 insertion sort. --} insertionSort :: (Ord a) => [a] -> [a] insertionSort [] = [] insertionSort xs = fst (insert ([],xs)) where insert(low, high) = if hs==[] then (ls, hs) else insert (ls, hs) where ls = [x|x<-low, x <= head high] ++ [head high] ++ [x|x<-low, x > h...
Mooophy/DMA
ch02/proj06.hs
mit
366
7
9
103
142
85
57
-1
-1
-- | -- Module: Network.Transportation.Germany.DVB.Monitor -- Copyright: (C) 2016 Braden Walters -- License: MIT (see LICENSE file) -- Maintainer: Braden Walters <[email protected]> -- Stability: experimental -- Portability: ghc module Network.Transportation.Germany.DVB.Monitor ( MonitorRequest(..) , MonitorResul...
meoblast001/dresdner-verkehrsbetriebe
src/Network/Transportation/Germany/DVB/Monitor.hs
mit
3,102
0
18
564
597
339
258
57
3
{-# LANGUAGE GADTs, OverloadedStrings, InstanceSigs, TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} -- | Provides actions for Channel API interactions module Network.Discord.Rest.Channel ( ChannelRequest(..) ) where import Data.Aeson import Data.ByteString.Lazy i...
jano017/Discord.hs
src/Network/Discord/Rest/Channel.hs
mit
7,883
0
16
2,174
2,224
1,162
1,062
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} module JobServer (initializeJobServer, getJobServer, clearJobServer, runJobs, JobServerHandle, waitOnJob, runJob, tryWaitOnJob, returnToken, getToken, Token(..)) where import Control.Exception.Base (assert) import Control.Exception (catch, SomeException(..)) impo...
dinkelk/redo
src/JobServer.hs
mit
7,334
0
14
1,634
1,799
944
855
110
2
{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} module Apply (App(..) ,Wrap(..) ,TagC(..) ,TagD(..) ,TDef ,WrapDef(..) ,makeApplyInst ,wApply ,ap...
rgleichman/smock
Apply.hs
mit
706
0
6
215
144
95
49
25
0
{-# LANGUAGE LambdaCase, RecordWildCards, ScopedTypeVariables, ViewPatterns #-} module Test where import Rubik.Cube import Rubik.Cube.Facelet.Internal import Rubik.Cube.Cubie.Internal import Rubik.Cube.Moves.Internal import Rubik.Tables.Moves import Rubik.Misc import Rubik.Symmetry import Control.Applicative import C...
Lysxia/twentyseven
test/Test.hs
mit
14,319
0
18
3,353
4,187
2,164
2,023
312
2
---------------------------------------- -- | -- Module : Data.InfiniteSet -- License : MIT -- -- Maintainer : Joomy Korkut <[email protected]> -- Stability : experimental -- Portability : portable -- -- An experimental infinite set implementation. -- Important: This structure can contain repeated elements...
joom/herbrand-prolog
src/Data/InfiniteSet.hs
mit
3,423
0
9
818
967
524
443
51
1
module Solidran.Fib.DetailSpec (spec) where import Test.Hspec import Solidran.Fib.Detail spec :: Spec spec = do describe "Solidran.Fib.Detail" $ do describe "nextPair" $ do it "should correctly calculate the next sequence" $ do nextPair 1 (0, 1) `shouldBe` (1, 1) ...
Jefffrey/Solidran
test/Solidran/Fib/DetailSpec.hs
mit
713
0
18
247
241
130
111
17
1
module Main where import Network import Control.Monad import Control.Concurrent import System.IO import Text.Printf import Control.Exception import Control.Concurrent.Async import Control.Concurrent.STM import ConcurrentUtils (forkFinally) main :: IO () main = withSocketsDo $ do sock <- listenOn (PortNumber (fromIn...
Forec/learn
2017.3/Parallel Haskell/ch12/server2.hs
mit
1,645
0
16
447
609
290
319
56
4
module Sing where fstString :: [Char] -> [Char] fstString x = x ++ " in the rain" sndString :: [Char] -> [Char] sndString x = x ++ " over the rainbow" sing = if (x > y) then fstString x else sndString y where x = "Singin" y = "Somewhere"
Numberartificial/workflow
haskell-first-principles/haskell-from-first-principles-master/05/05.08.07-fix-it-1.hs
mit
257
0
7
69
96
54
42
9
2
{-# LANGUAGE NoImplicitPrelude #-} module Lib.List (filterA, unprefixed, unsuffixed, partitionA) where import Data.List (isPrefixOf, isSuffixOf) import Prelude.Compat filterA :: Applicative f => (a -> f Bool) -> [a] -> f [a] filterA p = go where go [] = pure [] go (x:xs) = combine <$> p x <*> go xs w...
sinelaw/buildsome
src/Lib/List.hs
gpl-2.0
964
0
10
233
449
232
217
24
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Glance.Web.Image where import Common (fromObject, underscoreOptions) import Control.Monad.IO.Class (MonadIO(..)) import Data.Aeson ( object, (.=), FromJSON(..), Value(..), To...
VictorDenisov/keystone
src/Glance/Web/Image.hs
gpl-2.0
3,466
0
14
720
1,088
572
516
84
2
{-# LANGUAGE OverloadedStrings #-} module EightTracks.Config ( Config(..) , withConfig , apiKey ) where import Data.ByteString import Data.Configurator import Data.Text data Config = Config { getLogin :: Text , getPassword :: Text } withConfig...
vikraman/8tracks
src/EightTracks/Config.hs
gpl-3.0
606
0
10
171
174
91
83
19
1
{-# LANGUAGE OverloadedStrings, ViewPatterns, DeriveGeneric #-} module Data.TPG where import qualified Data.ByteString as B import qualified Data.ByteString.Lazy.Char8 as LB import Data.Char (isSpace) import Data.String (fromString) import Data.List (stripPrefix, isSuffixOf, elemIndex) import Text.Printf (printf) imp...
michaelsproul/tpg-analyser
src/Data/TPG.hs
gpl-3.0
8,545
0
15
1,684
2,446
1,283
1,163
161
2
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE FlexibleContexts #-} module Data.Dist.Internal ( SDist , expected , extractSingleton , nonZeroPieces , normalize , sample , singleton , withProbability ) where import Control.Arrow (first) import Control.Monad.Random (Randomizable, getUni...
davidspies/regret-solver
game/src/Data/Dist/Internal.hs
gpl-3.0
1,883
0
11
395
782
428
354
47
1
-- grid is a game written in Haskell -- Copyright (C) 2018 [email protected] -- -- This file is part of grid. -- -- grid is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the Lice...
karamellpelle/grid
source/Game/Grid/Output/Fancy/ShadePath.hs
gpl-3.0
11,540
0
20
3,510
2,862
1,410
1,452
192
2
import qualified Data.ByteString.Lazy as B import qualified Data.ByteString as S
ljwolf/learnyouahaskell-assignments
sysrand.hs
gpl-3.0
81
0
4
10
18
13
5
2
0
module Main where import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Lazy as BL import Lib main :: IO () main = do let fileRemote = "fasljlajljalfjlajfasdjkg;fdk;kqpitpk;k;asdk;kg;adskg" fileLocal = "ljljalsjdgljadslfjlasjdfqporiuqplsadljfaljdf" blockSize = 5 ...
vu3rdd/hs-rsync
app/Main.hs
gpl-3.0
987
0
15
195
199
108
91
15
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-replicapool/gen/Network/Google/Resource/ReplicaPool/Pools/Delete.hs
mpl-2.0
3,857
0
17
957
550
326
224
87
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Threads/Get.hs
mpl-2.0
4,017
0
16
1,018
554
329
225
86
1
{- Copyright (C) 2013–2014 Albert Krewinkel <[email protected]> This file is part of ZeitLinse. ZeitLinse is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your o...
tarleb/zeitlinse
src/ZeitLinse.hs
agpl-3.0
959
0
5
149
31
20
11
5
1
{-# LANGUAGE CPP, MagicHash, BangPatterns #-} -- | -- Module : Data.Text.Internal.Encoding.Utf8 -- Copyright : (c) 2008, 2009 Tom Harper, -- (c) 2009, 2010 Bryan O'Sullivan, -- (c) 2009 Duncan Coutts -- -- License : BSD-style -- Maintainer : [email protected] -- Stability : e...
text-utf8/text
Data/Text/Internal/Encoding/Utf8.hs
bsd-2-clause
8,093
0
20
2,491
2,471
1,307
1,164
171
4
{-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | Defines a type-safe 'Data.Binary.Binary' instance to ensure data is -- encoded with the type it was serialized from. -- -- * The "Data.Binary.Typed.Tutorial" provides some more examples of usage. -- * The "Data.Binary.Typed.Debug...
quchen/binary-typed
src/Data/Binary/Typed.hs
bsd-2-clause
6,134
0
14
1,443
879
513
366
67
3
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QButtonGroup.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:20 Warning : this file is machine generated - do ...
keera-studios/hsQt
Qtc/Gui/QButtonGroup.hs
bsd-2-clause
11,769
0
14
1,903
3,678
1,867
1,811
-1
-1
module Web.Cloud where import Data.List import Data.IORef import Data.ByteString.Lazy.Char8 (pack, unpack) import System.Environment import Options.Applicative import Options.Applicative.Types import Options.Applicative.Help.Chunk import Network.CGI import Network.CGI.Monad import Network.CGI.Protocol import System.Ex...
mxswd/webcloud
src/Web/Cloud.hs
bsd-2-clause
2,902
0
21
647
1,075
541
534
73
3
{-# OPTIONS_HADDOCK hide #-} -- | -- -- Copyright: -- This file is part of the package byline. It is subject to the -- license terms in the LICENSE file found in the top-level -- directory of this distribution and at: -- -- https://github.com/pjones/byline -- -- No part of this package, including this file...
pjones/byline
src/Byline/Internal/Eval.hs
bsd-2-clause
7,413
0
22
1,866
1,824
950
874
-1
-1
module Network.YAML ( module Network.YAML.API, module Network.YAML.Caller, module Network.YAML.TH.Server, module Network.YAML.TH.Client, module Network.YAML.TH.Dispatcher ) where import Network.YAML.API import Network.YAML.Caller import Network.YAML.TH.Server import Network.YAML.TH.Client import N...
portnov/yaml-rpc
Network/YAML.hs
bsd-3-clause
347
0
5
48
79
56
23
12
0
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} module AstrodynamicsSpec where import Test.Hspec import Test.QuickCheck (property, (==>)) import Data.AEq import TestInstances import Numeric.Units.Dimensional.Prelude import qualified Prelude import Astrodynamics main = hspec spec spec = do ...
bjornbm/astro
test/AstrodynamicsSpec.hs
bsd-3-clause
995
0
16
161
247
130
117
27
1
{-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Types -- Copyright : Isaac Jones 2006, Duncan Coutts 2007-2009 -- -- Maintainer : [email protected] -- Portability : portable -- -- This provides a...
sopvop/cabal
Cabal/Distribution/Simple/Program/Types.hs
bsd-3-clause
6,743
0
15
1,533
645
418
227
61
1
-- | Display mode is for drawing a static picture. module Graphics.Gloss.Interface.Pure.Animate ( module Graphics.Gloss.Data.Display , module Graphics.Gloss.Data.Picture , module Graphics.Gloss.Data.Color , animate) where import Graphics.Gloss.Data.Display import Graphics.Gloss.Data.Pic...
ardumont/snake
deps/gloss/Graphics/Gloss/Interface/Pure/Animate.hs
bsd-3-clause
1,129
0
9
333
144
95
49
20
1
-- | An interface to blaze-html without the need for operators. module Senza (module Senza.Elements ,module Senza.Types ,module Text.Blaze.Html5.Attributes ,Attribute ,Attributable ,AttributeValue ,toValue ,renderSenza) where import Senza.Elements import Senza.Types import Data.Text.Lazy (Text) imp...
chrisdone/senza
src/Senza.hs
bsd-3-clause
693
0
5
92
133
88
45
18
1
module Crossword.Regex where import Data.Set (Set) import qualified Data.Set as Set import Crossword.Token data Regex = Literal Token | Any | OneOf (Set Token) | NoneOf (Set Token) | Many Regex | Many1 Regex | Seq Regex Regex | Group Regex | BackRef Int | Choice Regex Regex | Option Regex ...
hesselink/regex-crossword
src/Crossword/Regex.hs
bsd-3-clause
885
0
10
214
428
223
205
34
1