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 OverloadedStrings #-} module MattermostBot.Data.Config where import Data.Default (Default, def) import Data.Maybe (fromJust) import Data.Text as T import qualified Data.Yaml as Y import Data.Yaml (FromJSON(..), (.:))...
marcelbuesing/mattermost-bot
src/MattermostBot/Data/Config.hs
mit
1,567
0
17
364
324
188
136
35
0
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.MediaQueryListListener (newMediaQueryListListener, newMediaQueryListListenerSync, newMediaQueryListListenerAsync, MediaQueryListListener) where import Prelude ((.), (==), (>>=), return, IO, I...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/Generated/MediaQueryListListener.hs
mit
2,361
0
12
447
521
310
211
39
1
{-# LANGUAGE TemplateHaskell #-} module Text.Shakespeare.BaseSpec (spec) where import Test.Hspec import Text.Shakespeare import Text.ParserCombinators.Parsec ((<|>), ParseError, parse, runParser) import Text.Shakespeare.Base (Deref(..), Ident(..), parseDeref, parseVarString, parseUrlString, parse...
yesodweb/shakespeare
test/Text/Shakespeare/BaseSpec.hs
mit
3,271
0
21
746
606
330
276
63
1
module AyaScript.Parser where import AyaScript.GenES import AyaScript.Types import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Expr import Text.ParserCombinators.Parsec.Language import qualified Text.ParserCombinators.Parsec.Token as P lexer :: P.TokenParser () lexer = P.makeTokenParser (haskel...
AyaMorisawa/aya-script
src/AyaScript/Parser.hs
mit
3,403
0
16
820
1,338
699
639
99
1
module Opponent (randomMove) where import Game (Game, Unfinished, Position, move, openPositions) import System.Random (getStdRandom, randomR) randomMove :: Unfinished -> IO Game randomMove u = move <$> randomPosition u <*> pure u randomPosition :: Unfinished -> IO Position randomPosition = pick . openPositions pic...
amar47shah/NICTA-TicTacToe
src/Opponent.hs
mit
452
0
9
76
164
89
75
10
1
module KeymapTree ( Keymap, size, depth, get, set, toList, fromList ) where -- Modules for testing import Test.QuickCheck import Control.Monad import Data.List -- The data type data Keymap k a = Leaf | ...
PavelClaudiuStefan/FMI
An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator8/KeymapTree.hs
cc0-1.0
2,365
0
11
842
971
491
480
50
2
{-# LANGUAGE TemplateHaskell #-} module Ohua.Types.Environment where import Universum import Control.Lens.TH import Data.Default.Class import qualified Data.HashSet as HS import qualified Data.Vector as V import Ohua.Types.Make import Ohua.Types.Reference import Ohua.Types.Stage declareLenses [d| data Options ...
ohua-dev/ohua-core
core/src/Ohua/Types/Environment.hs
epl-1.0
1,896
0
9
476
286
167
119
-1
-1
{- | Module : ./Proofs/NormalForm.hs Description : compute the normal forms of all nodes in development graphs Copyright : (c) Christian Maeder, DFKI GmbH 2009 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(Logic)...
gnn/Hets
Proofs/NormalForm.hs
gpl-2.0
9,648
0
33
3,462
2,456
1,294
1,162
180
9
module Net.DHCP_Client where import Control.Monad(unless) import Data.Maybe(fromMaybe,listToMaybe) import Data.Bits(xor) import Monad.Util(whileM) import Net.DHCP import qualified Net.IPv4 as IP import qualified Net.Ethernet as Eth import qualified Net.UDP as UDP import Net.PacketParsing(doParse,doUnparse) import Net...
nh2/network-house
Net/DHCP_Client.hs
gpl-2.0
3,772
95
18
1,005
1,251
663
588
92
5
module Main( main ) where import Graphics.UI.Gtk( initGUI, mainGUI, mainQuit, on, timeoutAdd ) import Graphics.UI.Gtk.Gdk.Events( TimeStamp ) import Graphics.UI.Gtk.General.Enums( MouseButton ) import Graphics.UI.Gtk.Display.StatusIcon ( StatusIcon, statusIconNewFromStock, statusIconActivate, statusIconPopupMenu ...
ThranMaru/DotaWHcheck
Main.hs
gpl-2.0
3,356
0
12
613
888
476
412
72
1
-- -- Copyright (c) 2012 Citrix Systems, Inc. -- -- This program 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 2 of the License, or -- (at your option) any later version. -- -- This progra...
OpenXT/manager
xenmgr/XenMgr/Connect/NetworkDaemon.hs
gpl-2.0
6,963
3
25
1,532
1,713
867
846
133
3
module Math.REPL.Evaluator.Statement (evalStat) where -------------------------------------------------------------------------------- import Math.REPL.Evaluator.Cmd (evalCmd) import Math.REPL.Evaluator.Expr (evalExpr) import Math.REPL.Prim.Bindings (Bindings) import Math.REP...
sumitsahrawat/calculator
src/Math/REPL/Evaluator/Statement.hs
gpl-2.0
975
0
12
252
199
116
83
15
4
{- Copyright 2013 Matthew Gordon. This file is part of Gramophone. Gramophone 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 v...
matthewscottgordon/gramophone
src/Gramophone/GUI/ListAlbums.hs
gpl-3.0
1,389
0
13
294
133
77
56
18
1
module TrainedPlayer where import Games import MCTSPlayer import Data.Maybe import System.IO import System.Random import Control.Monad.Random import Control.Concurrent.ParallelIO distribute :: Int -> [a] -> [[a]] distribute n elems = distributeHelp 0 elems where distributeHelp i [] = replicate n [] distrib...
krame505/board_games
haskell/TrainedPlayer.hs
gpl-3.0
1,712
0
15
514
608
292
316
43
2
-- The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. -- The first ten terms would be: 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... -- What is the value of the first triangle number to have over five hundred divisors? import Data...
peri4n/projecteuler
haskell/problem12.hs
gpl-3.0
874
3
10
231
300
154
146
15
1
{-# LANGUAGE TypeSynonymInstances #-} module Elves.Value where import Elves.Exp import Data.Map -- simple direct valuation of the AST -- we only value FloatE!!!!! valueE :: Map Id Float -> FloatE -> Float valueE ctx (E a) = valueFloat ctx a valueBool _ (LitBool a) = a valueBool ctx (If c a...
audetto/andsoft
haskell/Elves/Value.hs
gpl-3.0
2,348
0
16
925
881
439
442
37
3
-------------------------------------------------------------------------------- -- | -- Module : Dhek.Engine -- -- -------------------------------------------------------------------------------- module Dhek.Engine ( DrawEnv(..) , DhekMode(..) , EngineState , RuntimeEnv , Pos , engineDrawingAre...
cchantep/dhek
Dhek/Engine.hs
gpl-3.0
1,042
0
5
235
131
91
40
34
0
module Brainfuck ( Program, Machine, Op(..), makeMachine, makeProgram, compileProgram, runMachine ) where import Control.Monad.State (StateT(..), liftIO) import Control.Monad (unless) import Data.Array (Array, (//), (!), bounds, array, listArray) import Data.Char (chr, ord) data Op = PtInc...
ledyba/Brainfucks
haskell/src/Brainfuck.hs
gpl-3.0
4,086
2
14
952
1,933
1,048
885
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/GetEffectiveFirewalls.hs
mpl-2.0
4,785
0
18
1,099
551
326
225
92
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs
mpl-2.0
7,491
0
24
1,961
1,261
722
539
179
1
module Game.Toliman.Graphical.Rendering.OpenGL ( module Types, module Core) where import Game.Toliman.Graphical.Rendering.OpenGL.Types as Types import Game.Toliman.Graphical.Rendering.OpenGL.Core as Core
duncanburke/toliman-graphical
src-lib/Game/Toliman/Graphical/Rendering/OpenGL.hs
mpl-2.0
210
0
4
22
41
32
9
5
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-classroom/gen/Network/Google/Resource/Classroom/Courses/CourseWork/StudentSubmissions/Patch.hs
mpl-2.0
10,075
0
24
2,291
1,201
705
496
178
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-android-publisher/gen/Network/Google/Resource/AndroidPublisher/Edits/Testers/Get.hs
mpl-2.0
3,572
0
16
852
458
272
186
74
1
module Jammin where import Data.List data Fruit = Peach | Plum | Apple | Blackberry deriving (Eq, Show, Ord) data JamJars = Jam { fruit :: Fruit, quantity :: Int } deriving (Eq, Show, Ord) -- cardinality: Card(Int) * Card(Fruit) = 18446744073709551616 * 4 -- = 73786976294838206464 row1 = J...
thewoolleyman/haskellbook
11/09/maor/jammin.hs
unlicense
1,042
0
11
237
414
227
187
35
2
-- run `cabal update` -- run `cabal install random` import System.Random roll100 :: IO Int roll100 = getStdRandom (randomR (1,100)) guess :: Int -> IO () guess x = do putStrLn "猜猜看1~100" l <- getLine if (read l :: Int) < x then do putStrLn "猜得太小了" gue...
bestian/haskell-sandbox
guessNumber.hs
unlicense
654
1
12
292
194
89
105
17
3
module TypeKwonDo where -- 1 f :: Int -> String f = undefined g :: String -> Char g = undefined h :: Int -> Char h x = (g . f) x -- 2 data A data B data C q :: A -> B q = undefined w :: B -> C w = undefined e :: A -> C e x = (w . q) x --3 data X data Y data Z xz :: X -> Z xz = undefined yz :: Y -> Z yz = unde...
dmp1ce/Haskell-Programming-Exercises
Chapter 5/typeKwonDo.hs
unlicense
497
0
9
163
280
160
120
-1
-1
-- in this example, we shall check the performance of prepend and append import Control.Monad.Writer -- finalCountDown' use normal append finalCountDown' :: Int -> Writer [String] () finalCountDown' 0 = tell ["0"] finalCountDown' x = do finalCountDown' (x-1) tell [show x] -- final CountDown uses DiffList (pr...
Oscarzhao/haskell
learnyouahaskell/monad_more/performance.hs
apache-2.0
826
0
11
156
317
164
153
19
1
module Main where main :: IO () main = do print (1 + 2) putStrLn "10" print (negate (-1)) print ((+) 0 blah) where blah = negate 1
OCExercise/haskellbook-solutions
chapters/chapter05/exercises/arith3broken.hs
bsd-2-clause
156
0
11
53
81
40
41
8
1
import Criterion.Main import Control.DeepSeq import Data.Time (UTCTime) import Data.Time.Clock.POSIX (posixSecondsToUTCTime) import Data.Text.Time (parseISODateTime) import qualified Data.TimeSeries as TS instance NFData a => NFData (TS.Series a) where rnf xs = rnf (TS.toList xs) seriesSize :: Integer seriesSi...
klangner/timeseries
benchmark/Benchmarks.hs
bsd-2-clause
1,377
2
15
297
527
258
269
33
1
-- | This module handles all display of output to the console when -- propellor is ensuring Properties. -- -- When two threads both try to display a message concurrently, -- the messages will be displayed sequentially. module Propellor.Message ( getMessageHandle, isConsole, forceConsole, actionMessage, actionMes...
ArchiveTeam/glowing-computing-machine
src/Propellor/Message.hs
bsd-2-clause
5,147
64
22
950
1,249
648
601
108
5
module Data.Bool.Predicate ( (.&&.) , (.||.) ) where (.&&.) :: (a -> Bool) -> (a -> Bool) -> (a -> Bool) (.&&.) f g v = f v && g v (.||.) :: (a -> Bool) -> (a -> Bool) -> (a -> Bool) (.||.) f g v = f v || g v
sethfowler/pygmalion
src/Data/Bool/Predicate.hs
bsd-3-clause
211
0
8
56
139
80
59
7
1
module Language.Iso.Target.JavaScript where import Language.Iso.App import Language.Iso.Fls import Language.Iso.Ite import Language.Iso.Lam import Language.Iso.Tru import Language.Iso.Var newtype JavaScript = JavaScript { runJavaScript :: String } instance Show JavaScript where show (JavaScript j...
joneshf/iso
src/Language/Iso/Target/JavaScript.hs
bsd-3-clause
905
0
11
216
266
141
125
25
0
{-| Module : Worker Description : Map Reduce only logic This module provides an entry point to compute MapReduce task. -} module Worker( run_worker -- :: Job k1 v1 k2 v2 v3 m p -> IO () ) where import Protocol import Reader import Data.List import System.Directory import System.IO import Control.Exception ...
zuzia/haskell_worker
src/Worker.hs
bsd-3-clause
6,975
0
14
1,581
1,215
636
579
79
2
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Web.RTBBidder.Protocol.Adx.BidRequest.UserDataTreatment (UserDataTreatment(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import...
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Protocol/Adx/BidRequest/UserDataTreatment.hs
bsd-3-clause
2,715
0
11
383
568
312
256
50
1
-------------------------------------------------------------------------------- -- | The LLVM Type System. -- module Llvm.Types where #include "HsVersions.h" import Data.Char import Data.Int import Data.List (intercalate) import Numeric import Constants import FastString import Unique -- from NCG import PprBase ...
nomeata/ghc
compiler/llvmGen/Llvm/Types.hs
bsd-3-clause
31,173
0
19
7,511
5,017
2,762
2,255
456
4
module Main where import Gli.Cli main :: IO () main = runParser
goromlagche/gli
app/Main.hs
bsd-3-clause
76
0
6
24
24
14
10
4
1
import Control.Applicative import Control.Monad import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as C8 import Data.List import Data.Maybe consumable :: [Int] consumable = scanl (+) 1 [6, 10..] mostConsumable :: Int -> (Int, Int) mostConsumable...
y-usuzumi/survive-the-course
www.icourse163.org/ZJU-93001/起步能力自测题/1.hs
bsd-3-clause
928
1
12
238
400
205
195
27
1
module Main where import Lib import HLiquid.Parser import System.Environment import Data.Either main :: IO () main = do files <- getArgs results <- mapM (\file -> parseFile fullFile file) files let success = length (rights results) mapM_ (putStrLn) (lefts results) putStrLn $ "Parsed " ++ (show success) ++...
xldenis/hliquid
app/Main.hs
bsd-3-clause
374
0
12
73
143
72
71
12
1
{-# language TemplateHaskell #-} module Phil.Typecheck.TypeError where import Control.Lens import Data.List import Data.List.NonEmpty (NonEmpty) import Data.Set (Set) import Data.Text (unpack) import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import qualified Data.Set as S import Phil.Core.AST.Identifier import Phi...
LightAndLight/hindley-milner
src/Phil/Typecheck/TypeError.hs
bsd-3-clause
5,350
0
16
1,781
1,306
672
634
137
15
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {- | Module : Language.ObjC.Runtime Description : High-level bindings allowing developers to interface with Objective-C License : BSD3 Maintainer : ian@iankdunc...
iand675/hobjc
src/Language/ObjC/Runtime.hs
bsd-3-clause
66,899
0
19
12,431
11,760
6,125
5,635
949
29
module Main where import Graphics.Gloss main = display disp color pic where disp = (InWindow "Nice Window" (200, 200) (10, 10)) color = white pic = pictures [Circle 80, Circle 40]
weiningl/tic-tac-toe
test.hs
bsd-3-clause
200
0
9
51
75
42
33
6
1
{-# LANGUAGE ScopedTypeVariables #-} import Control.Monad import Control.Concurrent import System.Environment import Foreign import System.LibVirt uri = "qemu:///system" main :: IO () main = do args <- getArgs case args of ["test"] -> initialize >> withConnection uri doTest ["list-nets"] ...
qnikst/libvirt-hs
Test.hs
bsd-3-clause
4,872
1
17
1,337
1,318
612
706
105
8
{-| Module : DeepControl.Monad.Trans Description : Deepened the usual Control.Monad.Trans module. Copyright : (c) Andy Gill 2001, (c) Oregon Graduate Institute of Science and Technology, 2001, (c) 2015 KONISHI Yohsuke License : BSD-style (see the file LICENSE) Maintainer : ocean0...
ocean0yohsuke/deepcontrol
DeepControl/Monad/Trans.hs
bsd-3-clause
7,636
0
15
1,510
1,414
782
632
57
1
{-# OPTIONS_GHC -Wno-missing-signatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} module Cm.ORSet where import Control.Monad.State.Strict (evalStateT) import qualified Data.MultiMap as MultiMap import Tes...
cblp/crdt
crdt-test/test/Cm/ORSet.hs
bsd-3-clause
1,861
0
18
600
594
332
262
37
1
----------------------------------------------------------------------------- -- | -- Module : Language.VHDL.Ppr -- Copyright : (c) SAM Group, KTH/ICT/ECS 2007-2008 -- License : BSD-style (see the file LICENSE) -- -- Maintainer : christiaan.baaij@gmail.com -- Stability : experimental -- Portability ...
christiaanb/vhdl
Language/VHDL/Ppr.hs
bsd-3-clause
3,107
2
10
681
771
409
362
-1
-1
{-| Module : Mandelbrot Description : Algorithm of Mandelbrot functions Module which get resolution of image and points and calculate correct color to point based on Mandelbrot algorithm -} module Mandelbrot (drawMandelbrot, runMandelbrotTests, runQuickCheckMandelbrot) where import Data.Complex import Graphics.GD...
jsamol/fractal-painter
src/Mandelbrot.hs
bsd-3-clause
2,452
0
12
522
646
345
301
35
1
{-#LANGUAGE OverloadedStrings#-} {- Project name: Gtf2Table Min Zhang Date: March 1, 2016 Version: v0.1.0 README: Fix some genes have errors in annotation -} module Gtf2Table where import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.IO as TextIO import Control.Applicative import qualified Data.List...
Min-/Ensembl2Symbol
src/Gtf2Table.hs
bsd-3-clause
1,569
0
27
345
409
224
185
37
1
module AERN2.Local.Poly ( variable , genericisePoly , LocalPoly ) where import MixedTypesNumPrelude import AERN2.Interval import AERN2.MP.Ball import AERN2.Poly.Cheb import AERN2.RealFun.Operations import AERN2.Local.Basics import AERN2.MP.Dyadic import AERN2.Poly.Power.RootsInt import AERN2.Poly.Power.SignedSubres...
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/Local/Poly.hs
bsd-3-clause
2,692
4
13
523
974
525
449
-1
-1
data Formula = Atom Bool -- atomic formula | And Formula Formula -- f /\ f | Or Formula Formula -- f \/ f | Not Formula -- not(f) instance Show Formula where show (Atom a) = "Atom " ++ show a show (And a b) = "And (" ++ show a ++ ") (" ++ show b ++ ")" show (Or a b) = "O...
zseymour/latex-repo
CS 571/assignment3/code/formula.hs
mit
714
0
10
207
341
166
175
18
1
{- | Module : ./SoftFOL/ParseTPTP.hs Description : A parser for the TPTP Input Syntax Copyright : (c) C.Maeder, DFKI Lab Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable A parser for the TPTP Input Syntax v...
spechub/Hets
SoftFOL/ParseTPTP.hs
gpl-2.0
9,860
0
20
2,399
3,774
1,867
1,907
326
5
module Analysis.Interlevel.InterLevelCPSpec where import Data.Maybe (fromMaybe) import Test.Hspec import Abstract.Category import Abstract.Rewriting.DPO import Analysis.Interlevel.InterLevelCP import Category.TypedGraphRule ...
rodrigo-machado/verigraph
tests/Analysis/Interlevel/InterLevelCPSpec.hs
gpl-3.0
4,245
0
14
962
1,251
649
602
82
1
{-# LANGUAGE OverloadedStrings #-} -- Last updated 2008/11/04 11:11 -- http://www.imagemagick.org/discourse-server/viewtopic.php?f=10&t=10993 -- convert -size 640x480 xc:none -fill white -draw 'roundRectangle 15,15 624,464 15,15' logo: -compose SrcIn -composite mask_result.png -- import Graphics.ImageMagick...
flowbox-public/imagemagick
examples/round_mask.hs
apache-2.0
1,096
0
9
253
180
95
85
18
1
{-# LANGUAGE OverloadedStrings #-} {-| Implementation of the Ganeti maintenenace server. -} {- Copyright (C) 2015 Google Inc. 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 so...
onponomarev/ganeti
src/Ganeti/MaintD/Server.hs
bsd-2-clause
8,385
0
17
1,671
1,899
1,003
896
143
2
{- | The public face of Template Haskell For other documentation, refer to: <http://www.haskell.org/haskellwiki/Template_Haskell> -} module Language.Eta.Meta( -- * The monad and its operations Q, runQ, -- ** Administration: errors, locations and IO reportError, -- ...
rahulmutt/ghcvm
libraries/eta-meta/Language/Eta/Meta.hs
bsd-3-clause
6,072
0
5
1,687
1,169
817
352
98
0
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 TcInstDecls: Typechecking instance declarations -} {-# LANGUAGE CPP #-} module Eta.TypeCheck.TcInstDcls ( tcInstDecls1, tcInstDecls2 ) where import Eta.HsSyn.HsSyn import Eta.TypeCheck.TcBinds import Eta.TypeCheck.TcTyCl...
rahulmutt/ghcvm
compiler/Eta/TypeCheck/TcInstDcls.hs
bsd-3-clause
64,269
6
26
18,851
8,213
4,271
3,942
579
7
{-# LANGUAGE CPP #-} -- | This is where we define a mapping from Uniques to their associated -- known-key Names for things associated with tuples and sums. We use this -- mapping while deserializing known-key Names in interface file symbol tables, -- which are encoded as their Unique. See Note [Symbol table representa...
rahulmutt/ghcvm
compiler/Eta/Prelude/KnownUniques.hs
bsd-3-clause
6,452
0
11
1,446
838
487
351
66
7
{-# LANGUAGE PatternGuards, ScopedTypeVariables #-} module Main where import Prelude hiding ( mod, id, mapM ) import GHC hiding (flags) --import Packages import HscTypes ( isBootSummary ) import Digraph ( flattenSCCs ) import DriverPhases ( isHaskellSrcFilename ) import HscTypes ( msHsFile...
mcmaniac/ghc
utils/ghctags/Main.hs
bsd-3-clause
14,240
0
19
4,139
3,794
1,920
1,874
266
22
{-# LANGUAGE FlexibleContexts #-} module LoadInterfaces where import Control.Monad.Except (MonadError, MonadIO, liftIO, throwError) import Control.Monad.Reader (MonadReader, ask) import qualified Data.Graph as Graph import qualified Data.List as List import qualified Data.Set as Set import Data.Map ((!)) import qualif...
mgold/elm-make
src/LoadInterfaces.hs
bsd-3-clause
7,297
0
15
1,724
1,908
971
937
170
3
module Stack.Options.DockerParser where import Data.Char import Data.List (intercalate) import Data.Monoid.Extra import qualified Data.Text as T import Distribution.Version (anyVersion) import Options.Applica...
deech/stack
src/Stack/Options/DockerParser.hs
bsd-3-clause
6,673
0
33
2,870
1,199
593
606
137
4
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} module RIO.Prelude ( mapLeft , withLazyFile , fromFirst , mapMaybeA , mapMaybeM , forMaybeA , forMaybeM , stripCR , RIO (..) , runRIO , module X ) where import ...
anton-dessiatov/stack
subs/rio/src/RIO/Prelude.hs
bsd-3-clause
7,400
0
16
3,185
1,858
1,174
684
-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="ja-JP"> <title>AMF Support</title> <maps> <homeID>amf</homeID> <mapref location="map.jh...
thc202/zap-extensions
addOns/amf/src/main/javahelp/help_ja_JP/helpset_ja_JP.hs
apache-2.0
956
82
52
156
390
206
184
-1
-1
{- Progression-based benchmarks. Progression charts the difference between successive benchmark runs. -} import Criterion.Main hiding (defaultMain, defaultMainWith) import Progression.Main import System.Environment (withArgs) import qualified HledgerMain main = defaultMain $ bench "balance_100x100x10" $ nfIO ...
adept/hledger
tools/progressionbench.hs
gpl-3.0
401
1
8
50
77
43
34
6
1
-- From the GHC users mailing list, 3/9/14 {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} module Sock where import Data.Proxy import Data.Kind data Message data SocketType = Dealer | Pu...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/Sock.hs
bsd-3-clause
1,427
0
12
315
430
237
193
-1
-1
module TestImport ( module TestImport , module X ) where import Application (makeFoundation) import ClassyPrelude as X import Database.Persist as X hiding (get) import Database.Persist.Sql (SqlPersistM, runSqlPersistMPool) import Foundation as X import Model ...
lubomir/dot-race
test/TestImport.hs
bsd-3-clause
806
0
10
217
190
110
80
23
1
-- !!! Re-exporting alias which maps to multiple mods; some qualified. module M where import Mod138_A x = zipWith5 y = isLatin1
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/module/mod138.hs
bsd-3-clause
134
0
4
28
18
12
6
4
1
-- | Compose drawable items into a scene graph. module Iris.SceneGraph ( module X ) where import Iris.SceneGraph.Clipper as X import Iris.SceneGraph.DrawGraph as X import Iris.SceneGraph.DynamicScene as X
jdreaver/iris
src/Iris/SceneGraph.hs
mit
221
0
4
44
37
27
10
5
0
-- | -- Module: Math.NumberTheory.Recurrencies.BilinearTests -- Copyright: (c) 2016 Andrew Lelechenko -- Licence: MIT -- Maintainer: Andrew Lelechenko <andrew.lelechenko@gmail.com> -- Stability: Provisional -- -- Tests for Math.NumberTheory.Recurrencies.Bilinear -- {-# OPTIONS_GHC -fno-warn-type-defaults...
cfredric/arithmoi
test-suite/Math/NumberTheory/Recurrencies/BilinearTests.hs
mit
6,566
0
17
1,436
2,146
1,104
1,042
143
4
{-# OPTIONS_GHC -XFlexibleInstances #-} module SetADT ( Set , empty , sing , memSet , union, inter, diff , eqSet , subSet , makeSet , mapSet , filterSet , foldSet , ...
tonyfloatersu/solution-haskell-craft-of-FP
SetADT.hs
mit
3,526
0
11
1,375
1,860
930
930
103
2
module HW01Spec where import Test.Hspec import HW01 spec :: Spec spec = do describe "lastDigit" $ it "should return the last digit" $ do lastDigit 123 `shouldBe` 3 lastDigit 0 `shouldBe` 0 lastDigit 123 `shouldBe` 3 lastDigit 1234 `shouldBe` 4 lastDigit 5 `shouldBe` 5 ...
mrordinaire/upenn-haskell
tests/HW01Spec.hs
mit
2,226
0
15
632
755
392
363
56
1
module Config ( Config(..) , Redmine(..) , readConfigFile ) where import Control.Applicative import Data.Aeson import qualified Data.ByteString.Lazy as BS import Data.Traversable (traverse) import System.Exit (exitFailure) import ...
k00mi/bckspc-bot
src/Config.hs
mit
2,518
0
33
1,254
523
285
238
62
2
{-# LANGUAGE QuasiQuotes #-} module AoC201604 ( runDay, ) where import Caesar (caesar) import Data.List (isInfixOf, sortBy) import Data.Map (toList, fromListWith) import Frequency import Language.Haskell.TH import Language.Haskell.TH.Quote import Str import Text.Parsec import Text.Parsec.String runDay :: IO () r...
rickerbh/AoC
AoC2016/src/AoC201604.hs
mit
48,937
0
12
1,587
863
444
419
74
2
{- | module: $Header$ description: Bytes license: MIT maintainer: Joe Leslie-Hurd <joe@gilith.com> stability: provisional portability: portable -} module OpenTheory.Byte where import qualified OpenTheory.Natural.Uniform as Uniform import qualified OpenTheory.Primitive.Byte as Byte import qualified OpenTheory.Primiti...
gilith/opentheory
data/haskell/opentheory-byte/src/OpenTheory/Byte.hs
mit
574
0
8
72
107
67
40
11
1
-- ---------------------------------------------------------------------- -- GenI surface realiser -- Copyright (C) 2009 Eric Kow -- -- This program 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 ver...
kowey/GenI
geni-test/NLP/GenI/Test.hs
gpl-2.0
2,584
0
13
461
447
278
169
41
2
------------------------------------------------------------------------------- {-# LANGUAGE Arrows #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE OverloadedStrings #-} module Main (main) where -------------------------------------------------------------------------------- import Data.Mon...
shi2wei3/hakyll_blog
src/Main.hs
gpl-2.0
8,478
0
22
2,700
1,607
759
848
171
1
module Tree ( Tree(..) , singleton , treeInsert , YesNo(..) ) where import Data.Monoid import qualified Data.Foldable as F class YesNo a where yesno :: a -> Bool data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show, Read, Eq) singleton :: a -> Tree a singleton x = Node x Empty Empty treeInsert :: (Ord...
friedbrice/Haskell
ch11/Tree.hs
gpl-2.0
1,192
0
9
370
565
287
278
37
1
{-| Implementation of cluster-wide logic. This module holds all pure cluster-logic; I\/O related functionality goes into the /Main/ module for the individual binaries. -} {- Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc. This program is free software; you can redistribute it and/or modify it under the term...
ribag/ganeti-experiments
src/Ganeti/HTools/Cluster.hs
gpl-2.0
78,781
1
23
24,729
17,185
9,326
7,859
1,273
8
-- Copyright 2016, 2017 Robin Raymond -- -- This file is part of Purple Muon -- -- Purple Muon 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) an...
r-raymond/purple-muon
src/Client/States/MenuState/Types.hs
gpl-3.0
1,447
0
10
286
125
89
36
13
0
-- Copyright (C) 2011,2012 Makoto Nishiura. -- This file is part of ERASM++. -- ERASM++ 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, or (at your option) any later -- ...
nishiuramakoto/erasm-plusplus
src/haskell/ErasmCommon.hs
gpl-3.0
4,698
0
12
1,516
1,586
905
681
-1
-1
module Example.Eg66 (eg66) where import Graphics.Radian import ExampleUtils eg66 :: IO Html eg66 = do d <- readJSON "fathers.json" let ages = (flatten $ d .^ "fathers" #^ "daughters") #^ "age" x = seqStep 0 (length ages) 1 plot = Plot [ps] # [height.=300, aspect.=1.6] ps = Points x ages # [marke...
openbrainsrc/hRadian
examples/Example/Eg66.hs
mpl-2.0
464
3
14
111
159
83
76
-1
-1
module Handler.ProjectBlog where import Import import Handler.Comment as Com import Handler.Discussion import Handler.Utils import Model.Blog import Model.Comment import Model.Comment.ActionPermissions import Model.Comment.HandlerInfo import Model.Comment.Mods import Model.Comment.Sql import Model.Markdown import Mod...
chreekat/snowdrift
Handler/ProjectBlog.hs
agpl-3.0
30,095
0
18
5,634
6,345
3,097
3,248
-1
-1
-- -- Copyright 2017-2018 Azad Bolour -- Licensed under GNU Affero General Public License v3.0 - -- https://github.com/azadbolour/boardgame/blob/master/LICENSE.md -- {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE DisambiguateRecordFields #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ...
azadbolour/boardgame
haskell-server/src/BoardGame/Server/Domain/PieceProvider.hs
agpl-3.0
3,252
1
13
481
766
430
336
54
2
-- | Layer module, defining functions to work on a neural network layer, which -- is a list of neurons module AI.HNN.Layer where import AI.HNN.Neuron import Control.Arrow import Data.Vector (Vector(), fromList, sum, toList, zipWith) import Data.List (foldl') -- * Layer creation -- | Creates a layer compound of n n...
alpmestan/HNN-0.1
AI/HNN/Layer.hs
lgpl-3.0
3,290
0
11
561
798
441
357
37
1
module Network.Haskoin.Wallet.KeyRing ( -- *Database KeyRings initWallet , newKeyRing , keyRings , keyRingSource , getKeyRing -- *Database Accounts , accounts , accountSource , newAccount , addAccountKeys , getAccount , isMultisigAccount , isReadAccount , isCompleteAccount -- *Database Addresses , getAddress , addr...
tphyahoo/haskoin-wallet
Network/Haskoin/Wallet/KeyRing.hs
unlicense
29,147
1
25
8,884
7,236
3,697
3,539
-1
-1
{- Reverse a string Reverse a sentence ("bob likes dogs" -> "dogs likes bob") Find the minimum value in a list Find the maximum value in a list Calculate a remainder (given a numerator and denominator) Return distinct values from a list including duplicates (i.e. "1 3 5 3 7 3 1 1 5" -> "1 ...
Crazycolorz5/Haskell-Code
fizzBuzz_tasks.hs
unlicense
1,286
6
10
305
230
120
110
13
2
module Main where import MiniLambda import MiniLambda.Parser import MiniLambda.Definitions import System.IO (hFlush, stdout) main :: IO () main = do putStr "> " hFlush stdout input <- dropWhile (==' ') <$> getLine handle input main handle :: String -> IO () handle "" = return () handle input = putStrLn $ ...
phipsgabler/mini-lambda
app/Main.hs
unlicense
404
0
10
79
150
75
75
16
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} import qualified Data.ByteString.Char8 as C import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.ByteString.Unsafe as BLU import Data.ByteString.Lazy.Builder #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ < 707 import Data.ByteString.Lazy.Bu...
wangbj/haskell
venom.hs
bsd-2-clause
2,575
9
13
662
1,113
601
512
69
1
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} module Data.Interface.Type.Type where import qualified Data.Functor.Foldable as FF import Data.Interface.Name import Data.Interface...
cdxr/haskell-interface
src/Data/Interface/Type/Type.hs
bsd-3-clause
6,160
0
13
1,794
1,627
840
787
146
7
-------------------------------------------------------------------- -- | -- Module : Network.Delicious.User -- Copyright : (c) Galois, Inc. 2008 -- License : BSD3 -- -- Maintainer : Sigbjorn Finne <sigbjorn.finne@gmail.com> -- Stability : provisional -- Portability : portable -- -------------------------...
GaloisInc/delicious
Network/Delicious/RSS.hs
bsd-3-clause
6,778
0
15
1,319
1,456
795
661
131
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} module Console ( Console , exitSuccess' , getLine' , putStrLn' , runConsole , runConsoleM , runConsolePure , runConsolePureM ) where...
IxpertaSolutions/freer-effects
examples/src/Console.hs
bsd-3-clause
4,210
0
15
945
1,360
741
619
78
6
-- Warn.hs {-# OPTIONS_GHC -Wall #-} module Warn( warn ) where import System.IO import System.IO.Unsafe warningsEnabled :: Bool warningsEnabled = True warn :: String -> a -> a warn msg x | warningsEnabled = (unsafePerformIO $ hPutStrLn stderr msg) `seq` x | otherwise = x
ghorn/conceptual-design
Warn.hs
bsd-3-clause
298
0
9
71
88
49
39
10
1
module Util where import ClassyPrelude import Data.Aeson.Types newtype TypeTag a b = TypeTag { unTTag :: b } toTag :: b -> TypeTag a b toTag = TypeTag jsonOptions :: Options jsonOptions = defaultOptions { fieldLabelModifier = camelTo '_' . filter (/= '_') } jsonEnumOptions :: Options jsonEn...
JustusAdam/bitbucket-github-migrate
src/Util.hs
bsd-3-clause
1,021
0
10
189
313
168
145
19
1
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} ------------------------------------------------------------------------------- -- | -- Module : Yesod.Comments.Utils -- Copyright : (c) Patrick Brisbin 2010 -- License : as-is -- -- Maintainer : pbr...
pbrisbin/yesod-comments
Yesod/Comments/Utils.hs
bsd-3-clause
2,481
0
10
513
482
256
226
44
2
{-# LANGUAGE UndecidableInstances #-} module Data.ByteString.IsoBaseFileFormat.Util.TypeLayout where import Data.Kind import Data.Type.Bool import Data.Type.Equality import GHC.TypeLits ---- type family IsRuleConform (b :: k) (r :: l) :: Bool ---- data TopLevel :: Type -> Type type instance IsRuleConform t (TopLeve...
sheyll/isobmff-builder
src/Data/ByteString/IsoBaseFileFormat/Util/TypeLayout.hs
bsd-3-clause
1,807
0
11
485
721
395
326
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Control.Distributed.Process.Extras.Internal.Queue.SeqQ -- Copyright : (c) Tim Watson 2012 - 2013 -- License : BSD3 (see the file LICENSE) -- -- Maintainer : Tim Watson <watson.timothy@gmail.com> -- Stability ...
qnikst/distributed-process-extras
src/Control/Distributed/Process/Extras/Internal/Queue/SeqQ.hs
bsd-3-clause
1,511
0
11
329
454
251
203
40
2
{-# LANGUAGE NoMonomorphismRestriction, DeriveDataTypeable #-} {-# OPTIONS -Wall #-} module Data.Numbering ( Numbering(..), -- * Construction enumNu, enumNu', nuFromSet, nuFromDistinctVector, nuFromDistinctVectorG, finiteTypeNu, idNu, emptyNu, -- ** From a list nuFromDist...
DanielSchuessler/numbering
Data/Numbering.hs
bsd-3-clause
11,333
0
16
2,916
2,896
1,555
1,341
226
2
{-# LANGUAGE PatternGuards, ParallelListComp, TemplateHaskell, CPP #-} module ApiCompat.ShowInfo where import Control.Applicative ( (<$>) ) import Data.Char ( isAlphaNum ) import Data.Function ( on ) import Data.Generics ( Data, Typeable, listify, everywher...
mgsloan/api-compat
src/ApiCompat/ShowInfo.hs
bsd-3-clause
9,184
1
17
3,040
3,905
1,962
1,943
194
37
module System.Spinner ( withSpin , withSpin' , Spinner(..) ) where import Control.Monad (when) import Control.Concurrent (forkIO, threadDelay) import Data.IORef (newIORef, readIORef, writeIORef) import Data.Function (fix) import System.IO (hPutStr, hFlush, stderr) data Spinner = Plain | Shobon | Custom [Strin...
lotz84/spinner
src/System/Spinner.hs
bsd-3-clause
1,457
0
14
544
388
207
181
37
1
{-# LANGUAGE PatternGuards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS -fno-warn-name-shadowing #-} {-# OPTIONS -fno-warn-orphans #-} -- ModName (ModuleName l) module Language.Haskell.Names.Imports (processImports) where import Fay.Compiler.ModuleT import qualified Language.Haskell.Names.GlobalSymbolTable...
beni55/fay
src/haskell-names/Language/Haskell/Names/Imports.hs
bsd-3-clause
8,276
0
20
2,745
2,306
1,162
1,144
225
8
----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.SHFSTM.Internal -- Copyright : (c) D. Sabel, Goethe-University, Frankfurt a.M., Germany -- License : BSD-style -- -- Maintainer : sabel <at> ki.cs.uni-frankfurt -- Stability : experimen...
dsabel/stmshf
Control/Concurrent/SHFSTM/Internal.hs
bsd-3-clause
26,818
0
26
8,642
6,578
3,255
3,323
468
3
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Main where import Control.Applicative import Control.Monad import Control.Monad.Reader import Data.Aeson import qualified D...
silkapp/bloodhound
tests/tests.hs
bsd-3-clause
28,356
0
33
7,810
8,083
3,908
4,175
577
1