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 FlexibleContexts #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE QuasiQuotes #-} module Score.Render ( printScorePage, Orientation(..), RenderingOptions(..), renderingOptionsOrientation ) where import Control.Lens ...
nkpart/score-writer
src/Score/Render.hs
bsd-3-clause
11,085
0
17
3,182
3,042
1,572
1,470
-1
-1
{-# LANGUAGE FlexibleContexts #-} -- | Module contains all stuff to migrate from AcidState to Postgres. module Guide.Database.Import ( loadIntoPostgres ) where import Imports import Data.Acid (EventResult, EventState, QueryEvent, query) import Hasql.Transaction (Transaction) import Hasql.Transa...
aelve/guide
back/src/Guide/Database/Import.hs
bsd-3-clause
7,693
0
14
1,187
1,623
808
815
-1
-1
module Chapter20 where import Data.Monoid ((<>)) data Constant a b = Constant a instance Foldable (Constant a) where foldMap _ _ = mempty data Two a b = Two a b instance Foldable (Two a) where foldMap f (Two _ x) = f x data Three a b c = Three a b c instance Foldable (Three a b) where foldMap f (Three _ _ x)...
taojang/haskell-programming-book-exercise
src/ch20/Chapter20.hs
bsd-3-clause
691
0
9
178
369
193
176
19
2
module OpCodes where import Control.Applicative (pure) import Data.Word (Word8, Word16) import Data.Bits import qualified Data.Vector as V ((//), (!), slice, toList, fromList, update) import Lens.Micro import Lens.Micro.Mtl (view) import CPU import Stack import Registers import Display (clearDisplay) import Data.Char ...
nmohoric/chip8
src/OpCodes.hs
bsd-3-clause
6,363
0
19
2,026
2,641
1,355
1,286
-1
-1
{-# LANGUAGE OverloadedStrings, NoImplicitPrelude, NamedFieldPuns #-} import BasePrelude hiding ((\\), finally, read) import qualified Control.Concurrent as C import qualified Control.Concurrent.Chan as Ch import Control.Concurrent.Suspend (sDelay) import Control.Concurrent.Timer (repeate...
trello/staunton
server/Main.hs
bsd-3-clause
9,030
0
27
2,522
3,124
1,586
1,538
233
4
module Main where import Control.Exception (Handler(..), ErrorCall(..)) import qualified Control.Exception as E import qualified System.Console.GetOpt as O import System.Environment (getArgs) import System.Exit (exitFailure) import System.IO (hPutStr, hPutStrLn, stdout, stderr, hSetEncoding, utf8) import Language.Has...
darthdeus/ghc-mod-ng
src/GHCMod.hs
bsd-3-clause
1,378
0
12
294
390
205
185
31
5
/*Owner & Copyrights: Vance King Saxbe. A.*//* Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe...
VanceKingSaxbeA/GoldSaxMachineStore
GoldSaxMachineModule7/src/GoldSaxMachineModule7/APriori/Types.hs
mit
3,729
23
16
864
1,127
601
526
55
1
module Test.Pos.Launcher.Gen where import Hedgehog import qualified Hedgehog.Gen as Gen import qualified Hedgehog.Range as Range import Universum import Ntp.Client (NtpConfiguration (NtpConfiguration)) import Pos.Configuration (NodeConfiguration (NodeConfiguration)) import ...
input-output-hk/pos-haskell-prototype
lib/test/Test/Pos/Launcher/Gen.hs
mit
2,402
0
16
555
509
287
222
39
1
{-# LANGUAGE OverloadedStrings #-} module ClientRepo (getClients, saveClient, deleteClient) where import Client import DBConnection import Database.MySQL.Simple getClients :: IO [Client] getClients = do conn <- connectDB clients <- query_ conn "SELECT * FROM clients" return clients saveClient :: Client -> IO ...
botandrose/eboshi_api_shootout
haskell_scotty/ClientRepo.hs
mit
821
0
11
140
208
102
106
23
1
{- Main.hs; Mun Hon Cheong (mhch295@cse.unsw.edu.au) 2005 Main module -} module Main where import TextureFonts import Graphics.UI.GLUT import Graphics.Rendering.OpenGL import Data.IORef import Data.Maybe import Control.Monad import qualified HGL as HGL import AFRP import AFRPInternals import AFRPForceable import G...
snowmantw/Frag
src/Main.hs
gpl-2.0
14,090
0
19
4,797
4,188
2,142
2,046
305
10
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeCommands.hs
mpl-2.0
5,248
0
10
1,031
660
398
262
71
1
{- Copyright 2012-2013 Google Inc. All Rights Reserved. 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 t...
mzero/plush
src/Plush/Run/ExecuteType.hs
apache-2.0
3,043
0
17
654
696
360
336
53
17
module Ivory.Artifact.Transformer ( Transformer() , emptyTransformer , transform , transformErr , runTransformer ) where newtype Transformer a = Transformer { unTransformer :: a -> Either String a } emptyTransformer :: Transformer a emptyTransformer = Transformer Right transform :: (a -> a) -...
GaloisInc/ivory
ivory-artifact/src/Ivory/Artifact/Transformer.hs
bsd-3-clause
672
0
11
144
237
122
115
23
1
{- Copyright 2015 Google Inc. All rights reserved. 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 a...
Ye-Yong-Chi/codeworld
codeworld-base/src/HaskellPrelude.hs
apache-2.0
817
0
5
153
50
34
16
6
2
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {-| Unittests for the SlotMap. -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions ...
andir/ganeti
test/hs/Test/Ganeti/SlotMap.hs
bsd-2-clause
8,912
0
17
2,123
1,946
1,050
896
138
1
{-# LANGUAGE TypeFamilies, Rank2Types, ImpredicativeTypes, DataKinds #-} module Tests.Lazy where import Prelude hiding (Real) import Language.Hakaru.Lazy hiding (disintegrate) import Language.Hakaru.Compose import Language.Hakaru.Any (Any(Any, unAny)) import Language.Hakaru.Syntax (Hakaru(..), Base(..), ...
zaxtax/hakaru
haskell/Tests/Lazy.hs
bsd-3-clause
19,965
0
24
5,974
7,476
3,972
3,504
461
1
{-# language LambdaCase, ViewPatterns, RecordWildCards, OverloadedStrings #-} module GameEngine.Graphics.GameCharacter where import Control.Monad import Data.Char import Data.List import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import qualified Data.HashMap.Strict as HashMap import Data.ByteSt...
csabahruska/quake3
game-engine/GameEngine/Graphics/GameCharacter.hs
bsd-3-clause
6,788
0
16
1,378
1,422
776
646
118
3
<?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>Retest Add-On</title> <maps> <homeID>retest</homeID> <mapref location="m...
kingthorin/zap-extensions
addOns/retest/src/main/javahelp/org/zaproxy/addon/retest/resources/help_fr_FR/helpset_fr_FR.hs
apache-2.0
961
77
67
156
411
208
203
-1
-1
module Dwarf ( dwarfGen ) where import CLabel import CmmExpr ( GlobalReg(..) ) import Config ( cProjectName, cProjectVersion ) import CoreSyn ( Tickish(..) ) import Debug import DynFlags import FastString import Module import Outputable import Platform import Unique import UniqSupply impo...
acowley/ghc
compiler/nativeGen/Dwarf.hs
bsd-3-clause
7,485
0
16
2,162
1,601
853
748
121
2
{- | Module : Language.Egison.MList Licence : MIT This module provides definition and utility functions for monadic list. -} module Language.Egison.MList ( MList (..) , fromList , fromSeq , fromMList , msingleton , mfoldr , mappend , mconcat , mmap , mfor , mAny ) where import ...
egison/egison
hs-src/Language/Egison/MList.hs
mit
1,733
0
10
505
850
421
429
49
2
{-# Language TypeSynonymInstances, FlexibleInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, UndecidableInstances, DeriveDataTypeable, TypeFamilies, TupleSections #-} {- | Module : Language.Egison.Types Copyright : Satoshi Egi Licence : MIT This module contains type def...
beni55/egison
hs-src/Language/Egison/Types.hs
mit
23,935
0
19
5,086
8,785
4,703
4,082
587
2
module GUBS.Solve.SCC (sccDecompose, sccDecomposeWith, chainWith) where import qualified Text.PrettyPrint.ANSI.Leijen as PP import GUBS.Algebra import qualified GUBS.ConstraintSystem as CS import GUBS.Solve.Simplify (partiallyInterpret) import GUBS.Solve.Strategy sccDec...
mzini/gubs
src/GUBS/Solve/SCC.hs
mit
1,392
0
17
361
526
267
259
26
3
module Main where import Evaluator import Parser import System.Environment import Text.ParserCombinators.Parsec import TypeChecker main :: IO () main = do filename <- getArgs arg <- case filename of [] -> getContents fn:_ -> readFile fn case parse progra...
minib00m/jpp
src/Main.hs
mit
642
0
21
247
218
105
113
23
5
#!/usr/bin/env runhaskell import Text.Printf maxIterations = 200 epsilon = 1e-6 f :: Double -> Double f x = x * exp x + x ^^ 3 + 1 bisect :: (Double -> Double) -> Double -> Double -> Int -> IO () bisect g a b i = do let m = (a + b) / 2 fa = g a fm = g m dx = (b - a) / 2 printf "%d %.3f ...
ergenekonyigit/Numerical-Analysis-Examples
Haskell/BisectionMethod.hs
mit
746
0
12
279
329
162
167
23
3
module Parser.Internal.AST where import Control.Monad.Reader import Data.List (partition) import qualified Data.Map as M import Parser.Internal.CST type EnvMap = M.Map String [String] buildGlobalEnv :: [Directive] -> EnvMap buildGlobalEnv ds = foldl mapper M.empty $ filter (\d -> null $ nested d) ds where ...
wayofthepie/httpd-conf-parser
src/Parser/Internal/AST.hs
mit
1,760
0
12
795
486
257
229
23
2
{-# LANGUAGE TemplateHaskell #-} module Utils.Geo where import Data.Aeson as Json (decode) import Data.Aeson.TH import qualified Network.HTTP.Client as HTTP data Telize = Telize { country_code :: String } $(deriveJSON defaultOptions ''Telize) -- TODO: 1) define time-out 2) define exception handling findCountryCod...
stefanodacchille/itson
src/backend/Utils/Geo.hs
mit
753
0
12
140
179
93
86
16
2
mnr = tail [0,1,2,3,4,5,6,7] :: [Integer] {- Matrikelnummer -} name = "Mustermann Max" :: String {- Name -} t1 = ("p1", (drop 9.show)mnr, (take 3.zip name.tail)name) t2 = (\a b c d -> ( (b.a)d, (a.b)d )) {- Nur allgemeinster Typ -} t3 = t2 (take 3) reverse (drop 3) mnr t4 = (drop 4 [[i-1] | i<-mnr], take 3 [i | i<-...
Szuuuken/funk-prog-pruefungs-vorbereitung
pruefung-2019-01-17/Aufgabe01.hs
mit
561
4
10
132
415
223
192
12
1
module Web.PushBullet ( Connection(..), Response(..), defaultResponse, runPushBullet, getDevices, pushNoteToAll, pushNoteToDevice ) where import Web.PushBullet.Types import Web.PushBullet.Core import Web.PushBullet.Device import Web.PushBullet.Push
tlunter/PushBullet
src/Web/PushBullet.hs
mit
278
0
5
49
61
41
20
12
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MultiParamTypeClasses #-} import Test.HUnit hiding (Test) import Test.Hspec import Yesod.Core import Yesod.Form import Yesod.Test import Yesod.Test.CssQuery import Yesod.Test.TransversingCSS import Text.XML import...
wujf/yesod
yesod-test/test/main.hs
mit
8,577
0
24
3,219
2,013
939
1,074
193
4
-- | This module contains resolution routines for acts. module Game.Cosanostra.Resolver ( DepGraph , depGraph , depOrder , resolve ) where import Game.Cosanostra.Action import Game.Cosanostra.Effect import Game.Cosanostra.Resolver.Action import Game.Cosanostra.Resolver.Effect import Game.Cosanostra...
rfw/cosanostra
src/Game/Cosanostra/Resolver.hs
mit
8,585
0
21
2,125
2,354
1,252
1,102
-1
-1
module Tests where import Control.Monad (liftM2) import Distribution.TestSuite import qualified IntegrationTests import qualified ResponseParserTests tests :: IO [Test] tests = ResponseParserTests.tests `concatM` IntegrationTests.tests concatM :: Monad m => m [a] -> m [a] -> m [a] con...
timbodeit/qpx-api
test/Tests.hs
mit
339
0
9
75
101
58
43
10
1
{-# LANGUAGE OverloadedStrings, QuasiQuotes #-} module Y2017.M09.D26.Exercise where import qualified Codec.Compression.GZip as GZ import Data.Aeson import Data.Aeson.Encode.Pretty import Data.ByteString.Lazy.Char8 (ByteString) import qualified Data.ByteString.Lazy.Char8 as BL import Data.Map (Map) import qualified Da...
geophf/1HaskellADay
exercises/HAD/Y2017/M09/D26/Exercise.hs
mit
3,439
0
8
531
344
221
123
33
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Control.Timeout.Tests (tests) where import Control.Exception (SomeException, try) import Data.Maybe (isJust, isNothing) import Data.Time.Clock (NominalDiffTime, diffUTCTime, getCurrentTime) import Test.Tasty (TestTree, testGroup)...
lambda-llama/timeout
tests/Control/Timeout/Tests.hs
mit
2,942
0
15
612
722
373
349
61
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-servicecatalog-launchroleconstraint.html module Stratosphere.Resources.ServiceCatalogLaunchRoleConstraint where...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ServiceCatalogLaunchRoleConstraint.hs
mit
4,355
0
15
421
552
313
239
47
1
{-# LANGUAGE MultiParamTypeClasses, DeriveDataTypeable #-} module Type.Poly.Check where import Type.Poly.Data import Type.Poly.Tree import Type.Poly.Infer import Autolib.Reporter.Type import Autolib.ToDoc import Autolib.Size import Autolib.TES.Identifier import Inter.Types import qualified Challenger as C import...
Erdwolf/autotool-bonn
src/Type/Poly/Check.hs
gpl-2.0
1,389
3
15
380
371
195
176
37
1
import Data.Time import Data.Time.Clock.POSIX import Data.List import Data.Maybe import System.Locale (defaultTimeLocale) data Entry = Entry { abbrev :: String, date :: String } deriving (Show,Eq) secondsFrom :: POSIXTime -> POSIXTime -> Double secondsFrom startPt endPt = a - b where a = ptToDouble endP...
jsavatgy/season-count
seasons-count-read-from-file.hs
gpl-2.0
2,864
8
11
690
835
436
399
76
4
module HEP.Automation.MadGraph.Dataset.Set20110315set3 where import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.Cluster import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Dataset.Common my_ssetup :: S...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110315set3.hs
gpl-3.0
1,536
0
8
366
315
194
121
39
1
module Exp2FA ( grammar2etnfa ) where import Set import FiniteMap import Grammar import TA import FAtypes import Stuff import Options import Ids ------------------------------------------------------------------------ grammar2etnfa :: (Show a, Ord a) => Opts -> Grammar a -> ETNFA a grammar2etnfa opts (start, r...
jwaldmann/rx
src/Exp2FA.hs
gpl-3.0
806
6
17
184
320
172
148
23
1
-- http://graybeardprogrammer.com/?p=1 -- In haskell this time. data Operation a = Add | Subtract | Multiply | Divide | Push a test_ops = [ Push 4, Push 3, Subtract, Push 1, Add, Push 5, Multiply ] process state op = let act = case op of Add -> bin (+) Subtract -> bin (-) Multiply -> bin (*) Divide...
jmesmon/trifles
vssm.hs
gpl-3.0
466
2
12
122
208
111
97
12
5
module BarterParams ( BarterParams -- note only export data-constructor, not the accessors , mkBarterParams , getNumGoods , getConsumeArray , getMaxTries , getEquiPrice , isCheckEfficiency , getProduceGoodPriceFactor , isEquiInitialPrices , getAgentsPerGood , isVarySupply , getPriceUnitGood...
thalerjonathan/phd
thesis/code/barter/haskell/src/BarterParams.hs
gpl-3.0
3,452
0
9
943
660
403
257
98
1
{-# LANGUAGE ScopedTypeVariables #-} module Language.Mulang.Interpreter ( defaultContext, dereference, dereference', eval, eval', evalExpr, evalRaising, nullRef, ExecutionContext(..), Value(..) ) where import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map import ...
mumuki/mulang
src/Language/Mulang/Interpreter.hs
gpl-3.0
14,142
0
20
2,827
4,739
2,324
2,415
287
10
module STH.Lib.RegExpr where data CharClass = Alpha | AlNum | Punct | Digit deriving (Eq, Show) data RegEx = Literal Char | Range Char Char | AnyChar | OneOf CharClass | Choice [RegEx] | Sequence [RegEx] | Kleene RegEx deriving (Eq, Show)
nbloomf/st-haskell
src/STH/Lib/RegExpr.hs
gpl-3.0
278
0
7
81
90
54
36
16
0
{-#LANGUAGE GADTs, ConstraintKinds, RankNTypes, FlexibleContexts, PatternSynonyms, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses #-} module Carnap.Languages.PureFirstOrder.Logic.Rules where import Data.List (intercalate) import Data.Typeable (Typeable) import Data.Maybe (catMaybes) import Control.Lens...
opentower/carnap
Carnap/src/Carnap/Languages/PureFirstOrder/Logic/Rules.hs
gpl-3.0
18,518
1
19
5,992
5,976
3,005
2,971
266
8
{-# 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/InstanceGroupManagers/SetInstanceTemplate.hs
mpl-2.0
6,809
0
19
1,482
642
384
258
110
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-firebase-dynamiclinks/gen/Network/Google/Resource/FirebaseDynamicLinks/ReopenAttribution.hs
mpl-2.0
4,746
0
16
1,085
702
409
293
103
1
{-# LANGUAGE CPP, FlexibleInstances, TypeSynonymInstances #-} -- -- Copyright (c) 2005-2022 Stefan Wehr - http://www.stefanwehr.de -- -- This library 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; ...
skogsbaer/HTF
Test/Framework/Pretty.hs
lgpl-2.1
2,320
0
13
448
270
161
109
23
1
{-# language DeriveFunctor, DeriveFoldable, DeriveTraversable #-} module StoryMode.Types where import Data.Binary import Data.Initial -- | Versioned! -- Saves the state of an episode. -- 1. How many batteries were put in the battery terminal. -- (How many batteries are collected in total will be ...
nikki-and-the-robots/nikki
src/StoryMode/Types.hs
lgpl-3.0
1,223
0
9
329
251
137
114
34
0
{- Created : by NICTA. Last Modified : 2014 Jul 15 (Tue) 04:43:38 by Harold Carr. -} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} -- + Complete the 10 exercises below by filling out the function bodies. -- R...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2013-11-nicta/src/Course/List.hs
unlicense
19,983
0
20
6,474
6,332
3,448
2,884
527
3
{-# LANGUAGE NoImplicitPrelude #-} hello = "hello"
gelisam/hawk
tests/preludes/noImplicitPrelude/prelude.hs
apache-2.0
51
0
4
7
7
4
3
2
1
module Emulator.Video.TileMode where import Emulator.Memory import Emulator.Types import Emulator.Video.Palette import Emulator.Video.Util import Emulator.Video.VideoController import Utilities.Parser.TemplateHaskell import Data.Array.IArray import Data.Bits type ScreenEntry = (Address, Bool, Bool, Address) type Til...
intolerable/GroupProject
src/Emulator/Video/TileMode.hs
bsd-2-clause
9,592
0
16
1,619
3,303
1,726
1,577
-1
-1
{-# LANGUAGE RecordWildCards #-} -- | Baseline word-segmentation functions. module NLP.Concraft.DAG.Segmentation ( PathTyp (..) , pickPath , findPath -- * Frequencies , computeFreqs , FreqConf (..) -- * Ambiguity-related stats , computeAmbiStats , AmbiCfg (..) , AmbiStats (..) ) where import Control.M...
kawu/concraft
src/NLP/Concraft/DAG/Segmentation.hs
bsd-2-clause
9,854
0
15
2,238
1,861
1,022
839
173
5
{-# LANGUAGE BangPatterns #-} -- | Replace a string by another string -- -- Tested in this benchmark: -- -- * Search and replace of a pattern in a text -- module Benchmarks.Replace ( benchmark , initEnv ) where import Criterion (Benchmark, bgroup, bench, nf) import qualified Data.ByteString.Char8 as B impo...
bgamari/text
benchmarks/haskell/Benchmarks/Replace.hs
bsd-2-clause
1,590
0
12
376
514
287
227
37
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, NoMonomorphismRestriction, GADTs #-} module Render.Alerts where import Application import Data.Text import Heist import Snap.Snaplet import Snap.Snaplet.Session import Control.Monad.Trans import qualified Heist.Compiled as C getSessionValues :: [Text] -> AppHandle...
rjohnsondev/haskellshop
src/Render/Alerts.hs
bsd-2-clause
1,174
0
16
299
328
174
154
26
2
-- | module Main where import Test.QuickCheck import Test.QuickCheck.Monadic (assert, monadicIO, pick, pre, run) import Control.Monad (filterM,mapM) import qualified System.Directory as D import System.Exit (exitFailure,exitSuccess) import qualified System.FilePath as F import qualified System.Environment as E im...
ComputationWithBoundedResources/term-rewriting-xml
testsuite/Main.hs
bsd-3-clause
2,745
0
16
583
967
504
463
73
2
{-# LANGUAGE FlexibleInstances #-} module Data.List.TypeLevel.Constraint where import GHC.Exts (Constraint) -- | A constraint on each element of a type-level list. type family ListAll (ts :: [k]) (c :: k -> Constraint) :: Constraint where ListAll '[] c = () ListAll (t ': ts) c = (c t, ListAll ts c) cla...
andrewthad/vinyl-vectors
src/Data/List/TypeLevel/Constraint.hs
bsd-3-clause
488
3
9
113
205
116
89
-1
-1
module Data.Profunctor.Product.Class where import Data.Profunctor (Profunctor) -- | 'ProductProfunctor' is a generalization of 'Applicative'. -- -- It has the usual 'Applicative' "output" (covariant) parameter on -- the right. Additionally it has an "input" (contravariant) type -- parameter on the left. -- -- You wi...
karamaan/product-profunctors
Data/Profunctor/Product/Class.hs
bsd-3-clause
1,006
0
10
183
119
78
41
5
0
import Data.Foldable as F import Data.Functor.Identity import qualified Data.Vector.Storable as V import Control.Applicative import Data.Functor.Product import Linear import Control.Lens import ModelFit.Types import ModelFit.Fit import ModelFit.Model import ModelFit.Models.Fcs sources pts = runGlobalFitM $ do di...
bgamari/model-fit
Main.hs
bsd-3-clause
1,356
0
16
421
460
234
226
-1
-1
{-# OPTIONS -fglasgow-exts -XOverlappingInstances -XUndecidableInstances -XOverloadedStrings #-} module Main where import System.Mem.StableName import System.IO.Unsafe import Data.RefSerialize import Data.Monoid import Data.ByteString.Lazy.Char8(unpack) -- we use a default instance for show and read instances ins...
agocorona/RefSerialize
demo.hs
bsd-3-clause
613
0
11
125
186
101
85
19
1
{-# LANGUAGE GeneralizedNewtypeDeriving , RankNTypes #-} module Control.Monad.GraphT where import Data.Maybe import Data.Foldable import Data.Traversable import Control.Applicative import Control.Monad.State hiding (mapM_, mapM, forM) import Control.Monad.Cont hiding (mapM_, mapM, forM) impor...
jvranish/ContextT
src/Control/Monad/GraphT.hs
bsd-3-clause
5,979
0
26
1,426
2,530
1,257
1,273
102
3
{-# LANGUAGE PartialTypeSignatures #-} {-# OPTIONS_GHC -fno-warn-partial-type-signatures #-} {-# LANGUAGE CPP #-} -- #define DEBUG {-| Module : AERN2.Poly.Cheb.DCT Description : Interpolation using Discrete cosine transform Copyright : (c) Michal Konecny License : BSD3 Maintainer : ...
michalkonecny/aern2
aern2-fun-univariate/src/AERN2/Poly/Cheb/DCT.hs
bsd-3-clause
10,728
0
19
2,982
2,663
1,447
1,216
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE UnboxedTupl...
rrnewton/accelerate
Data/Array/Accelerate/Array/Memory/Table.hs
bsd-3-clause
19,085
0
20
5,424
4,784
2,431
2,353
267
29
{-# LANGUAGE TemplateHaskell , TypeOperators , MultiParamTypeClasses , GeneralizedNewtypeDeriving #-} module Heap.Alloc where import Control.Applicative import Control.Monad.Lazy import Control.Monad.Reader import Control.Monad.State import Data.Record.Label import Data.Word import System.IO.Binary import ...
sebastiaanvisser/islay
src/Heap/Alloc.hs
bsd-3-clause
3,307
0
15
895
1,270
646
624
108
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE UnboxedTuples #-} module Data.IntPSQ.Internal ( -- * Type Nat , Key , Mask , IntPSQ (..) -- * Query , null , size , member , lookup , findMin -- * Construction , empty , singleton ...
phadej/psqueues
src/Data/IntPSQ/Internal.hs
bsd-3-clause
23,961
0
21
8,058
7,699
3,945
3,754
449
7
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module DockerHub.Config ( load , Config(..) ) where {- @Issue( "Check if we could limit what is imported from Text.Internal, Yaml and Generics" type="improvement" priority="low" ) -} import qualified Data.ByteString.Char8 as BS (re...
krystalcode/docker-hub
src/DockerHub/Config.hs
bsd-3-clause
1,082
0
11
215
185
106
79
18
1
-- 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. {-# LANGUAGE OverloadedStrings #-} module Duckling.Numeral.CS.Corpus ( corpus ) where import Data.String impo...
facebookincubator/duckling
Duckling/Numeral/CS/Corpus.hs
bsd-3-clause
1,034
0
9
338
197
117
80
28
1
{- Copyright (c) 2010, 2012 Lukas Mai 2013, 2014 Jonathan Fischoff, João Cristóvão All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above ...
jcristovao/data-default-generics
src/Data/Default/Generics.hs
bsd-3-clause
9,797
0
11
1,930
2,776
1,531
1,245
167
0
{-# LANGUAGE ViewPatterns, ScopedTypeVariables, TemplateHaskell #-} import Control.Concurrent.STM import Control.Concurrent import Control.Monad import Control.Exception import Sound.OSC import qualified Data.Map as M import Control.Lens import Control.Lens.TH import Data.List import Data.Ord import System.Random imp...
paolino/medibox
Seq2.hs
bsd-3-clause
3,077
0
17
794
1,436
759
677
85
2
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TupleSections #-} module Data.Arib.PSI.PAT.Internal where import Control.Applicative import Contro...
philopon/arib
src/Data/Arib/PSI/PAT/Internal.hs
bsd-3-clause
1,176
0
19
314
297
171
126
37
1
{-# LANGUAGE CPP, GADTs, PackageImports #-} module Main where import Control.DeepSeq import Control.Exception (evaluate) import Control.Monad.Trans (liftIO) import Criterion.Config import Criterion.Main import Data.Bits ((.&.)) import Data.Hashable (Hashable) import qualified Data.ByteString as BS import qualified "h...
athanclark/lh-bug
deps/unordered-containers/benchmarks/Benchmarks.hs
bsd-3-clause
12,760
0
19
4,207
3,750
1,918
1,832
233
1
-- Copyright (c) 2015, Travis Bemann -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: -- -- o Redistributions of source code must retain the above copyright notice, this -- list of conditio...
tabemann/amphibian
src_old/Network/IRC/Client/Amphibian/Commands.hs
bsd-3-clause
17,556
0
4
3,444
2,605
1,618
987
592
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Logic.Books where import Database.Persist.MySQL import Servant import Control.Monad.Trans.Either import Control.Monad.IO.Class import Data.Text hiding (replace, length, an...
dbushenko/biblio
src/Logic/Books.hs
bsd-3-clause
3,762
0
22
1,040
1,276
647
629
78
4
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ConstraintKinds #-} -- | Loading targets. module GHC.Server.Controller.Load where import GHC.Compat import GHC.Server.Defaults import GHC.Server.Duplex import GHC...
chrisdone/ghc-server
src/GHC/Server/Controller/Load.hs
bsd-3-clause
2,909
0
20
1,133
714
369
345
70
4
{-# LANGUAGE CPP, OverloadedStrings #-} module MOO.Builtins (builtinFunctions, callBuiltin, verifyBuiltins) where import Control.Applicative ((<$>)) import Control.Monad (foldM) import Data.HashMap.Lazy (HashMap) import Data.List (transpose, inits) import Data.Maybe (fromMaybe) import Data.Monoid ((<>)) import qual...
verement/etamoo
src/MOO/Builtins.hs
bsd-3-clause
5,487
0
17
1,777
1,473
775
698
98
10
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Lib.ColorText ( ColorText(..), normalize, simple , render, renderStr, stripColors , withAttr , intercalate, lines, putStrLn, singleton ) where import Prelude.Compat hiding (putStrLn, lines) import Data.Binary (Binary) import Data.ByteString (ByteString) imp...
buildsome/buildsome
src/Lib/ColorText.hs
gpl-2.0
2,832
0
14
541
1,059
588
471
63
3
{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {- Copyright 2019 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this ...
alphalambda/codeworld
codeworld-base/src/Internal/Num.hs
apache-2.0
13,772
2
13
3,182
3,089
1,641
1,448
-1
-1
{-# LANGUAGE TemplateHaskell #-} module Database.DSH.SL.Opt.Rewrite.PruneEmpty(pruneEmpty) where -- import Control.Monad import Database.DSH.Common.Opt import Database.DSH.Common.VectorLang import Database.DSH.SL.Opt.Properties.Types import Database.DSH.SL.Opt.Rewrit...
ulricha/dsh
src/Database/DSH/SL/Opt/Rewrite/PruneEmpty.hs
bsd-3-clause
3,973
0
5
998
129
97
32
10
1
{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- Search for UndecidableInstances to see why this is needed ----------------------------------------------------------------------------- -- | --...
ekmett/mtl
Control/Monad/RWS/Class.hs
bsd-3-clause
2,517
0
8
403
476
290
186
-1
-1
module Code.Huffman.Test ( isoptimalprefix ) where -- $Id$ import Code.Type import Code.Huffman.LR import Code.Huffman.Make import Code.Measure import Autolib.Util.Sort import Autolib.FiniteMap import Autolib.Reporter import Autolib.ToDoc isoptimalprefix :: ( ToDoc b, ToDoc a, Ord a, Eq b ) => Frequency ...
Erdwolf/autotool-bonn
src/Code/Huffman/Test.hs
gpl-2.0
808
3
14
212
260
131
129
28
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.Unicode -- Copyright : (c) The University of Glasgow, 2003 -- License : see libraries/base/LICENSE -- -- Mai...
alexander-at-github/eta
libraries/base/GHC/Unicode.hs
bsd-3-clause
6,983
24
14
1,538
985
545
440
-1
-1
{-# LANGUAGE DataKinds, KindSignatures, RankNTypes, StandaloneDeriving, GADTs, TypeOperators, FlexibleInstances, ViewPatterns #-} import GHC.TypeLits import Data.IORef import System.IO.Unsafe (unsafePerformIO) import Unsafe.Coerce (unsafeCoerce) import Data.Type.Equality -- stratified simply-typed first-order lambda c...
cartazio/omega
mosaic/finally-infer.hs
bsd-3-clause
9,753
2
15
2,690
4,262
2,191
2,071
-1
-1
{-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes, TypeFamilies, MultiParamTypeClasses, ViewPatterns #-} module YesodCoreTest.Json ( specs , Widget , resourcesApp ) where import Yesod.Core import Test.Hspec import qualified Data.Map as Map import Network.Wai.Test import Data.Text (Text) impo...
s9gf4ult/yesod
yesod-core/test/YesodCoreTest/Json.hs
mit
1,527
0
14
376
408
206
202
43
2
{-# LANGUAGE NoOverloadedStrings, TypeSynonymInstances, GADTs, CPP #-} {- | Description : Wrapper around GHC API, exposing a single `evaluate` interface that runs a statement, declaration, import, or directive. This module exports all functions used for evaluation of IHaskell input. -} module IHask...
artuuge/IHaskell
src/IHaskell/Eval/Evaluate.hs
mit
49,851
0
30
15,065
9,798
4,956
4,842
880
30
import A; import A hiding (C)
bitemyapp/apply-refact
tests/examples/Import6.hs
bsd-3-clause
29
0
5
5
14
9
5
1
0
{-# LANGUAGE DataKinds, KindSignatures #-} module Example where import Data.Typeable import GHC.Exts data Wat (a :: TYPE 'UnboxedSumRep) = Wat a
olsner/ghc
testsuite/tests/unboxedsums/sum_rr.hs
bsd-3-clause
148
0
7
24
36
22
14
-1
-1
{-# LANGUAGE CPP, DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Language.Python.Common.Token -- Copyright : (c) 2009 Bernie Pope -- License : BSD-style -- Maintainer : bjpop@csse.unimelb.edu.au -- Stability : experimental -- Portabili...
maoe/language-javascript
src/Language/JavaScript/Parser/Token.hs
bsd-3-clause
10,332
0
10
1,752
2,297
1,369
928
519
1
{-# LANGUAGE GADTs #-} {-# OPTIONS_GHC -funbox-strict-fields #-} -- Tests record selectors with unboxed fields for GADTs module Main where data T a where T1 :: { w :: !(Int, Int), x :: a, y :: b } -> T (a,b) T2 :: { w :: !(Int, Int), x :: a } -> T (a,b) T3 :: { z :: Int } -> T Bool -- T1 :: forall c a b. (c~...
urbanslug/ghc
testsuite/tests/gadt/ubx-records.hs
bsd-3-clause
692
6
12
226
350
202
148
21
1
import Test.Hspec (hspec) import Spec (spec) main :: IO () main = hspec spec
AndreasPK/stack
src/test/Test.hs
bsd-3-clause
78
0
6
15
37
20
17
4
1
{-# LANGUAGE RankNTypes #-} module ShouldCompile where data Q = Q {f :: forall a. a -> a} g1 = f g2 x = f x g3 x y = f x y
urbanslug/ghc
testsuite/tests/deSugar/should_compile/ds050.hs
bsd-3-clause
125
0
10
35
60
33
27
6
1
{-# htermination join :: IO (IO a) -> IO a #-} import Monad
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Monad_join_4.hs
mit
60
0
3
13
5
3
2
1
0
module GHCJS.DOM.DedicatedWorkerGlobalScope ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/DedicatedWorkerGlobalScope.hs
mit
56
0
3
7
10
7
3
1
0
{- This is my xmonad configuration file. There are many like it, but this one is mine. If you want to customize this file, the easiest workflow goes something like this: 1. Make a small change. 2. Hit "super-q", which recompiles and restarts xmonad 3. If there is an error, undo your change and hit ...
mchi/xmonad-ubuntu-conf
xmonad.hs
mit
14,560
0
16
3,065
1,563
934
629
136
1
module Main where import Iptf (ipFromWeb, updateHosts) import Iptf.Options (Options (..), getOptions) main :: IO () main = do opts <- getOptions ip <- ipFromWeb $ url opts case ip of Left e -> putStrLn e Right ip' -> updateHosts ip' (name opts) (path opts)
werbitt/ip-to-file
app/Main.hs
mit
301
0
12
89
115
59
56
10
2
{-# LANGUAGE ViewPatterns #-} module Language.RobotC.Utils where import Control.Monad.Trans.Writer import Language.RobotC.Data.Program robotC :: Stmt -> RobotC robotC = tell . return robotC1 :: (a -> Stmt) -> a -> RobotC robotC1 f = robotC . f robotC2 :: (a -> b -> Stmt) -> a -> b -> RobotC robotC2 f = robotC1 . ...
qsctr/haskell-robotc
src/Language/RobotC/Utils.hs
mit
1,064
0
10
234
471
248
223
29
1
-- Numbers that are a power of their sum of digits -- https://www.codewars.com/kata/55f4e56315a375c1ed000159 module Codewars.G964.Powersumdig(powerSumDigTerm) where import Data.List(sort) f x 0 = x f x n = f (x + r) q where (q, r) = n `divMod` 10 ps n = filter ((== n) . sod) . map (n ^) $ [2..20] where sod ...
gafiatulin/codewars
src/5 kyu/Powersumdig.hs
mit
453
0
10
97
188
105
83
10
1
module Raytrace ( -- * Types Ray, Intersectable, Material(..), Object, Scene, -- * Raytracing traceRay, intersections, -- * Intersectables -- ** 3D objects sphere, cylinderShell, -- ** Polygons polygon, regularPoly, triangle, parallelogram, -- ** Other plane, -- * Lights mkLight, lights, isLig...
jwodder/hsgraphics
Raytrace.hs
mit
9,845
357
12
2,394
3,972
2,205
1,767
171
6
{-# LANGUAGE OverloadedStrings #-} module Main (main) where import FRP.Yampa import Game import Input import Rendering import System.Random (newStdGen) main :: IO () main = do g <- newStdGen animate "Flappy Haskell" (round winWidth) (round winHeight) $ parse...
Rydgel/flappy-haskell
src/Main.hs
mit
357
0
11
105
96
52
44
12
1
module Compiler.Compiler where import Language.Expr compile :: Program -> String compile (ProgEnd e) = compileExpr e ++ ";" compile (ProgCont e p) = compileExpr e ++ ";" ++ compile p compileExpr :: Expr -> String compileExpr (BinOp Add e1 e2) = compileExpr e1 ++ ".__add__(" ++ compileExpr e2 ++ ")" compileExpr (BinO...
dpzmick/io2js
src/Compiler/Compiler.hs
mit
613
0
8
107
246
120
126
11
1
-------------------------------------------------------------------------------- -- Module : Main -- Maintainer : maxdelgiudice@gmail.com -- Stability : Experimental -- Summary : Some common functions/datas used by a bunch of other modules. ---------------------------------------------------------------...
madelgi/hs-bot
src/Bot/Common.hs
mit
1,663
0
10
492
361
199
162
28
2
module Data.Foldable.CompatSpec (main, spec) where import Test.Hspec import Data.Foldable.Compat main :: IO () main = hspec spec spec :: Spec spec = do describe "maximumBy" $ do it "runs in constant space" $ do maximumBy compare [1..10000] `shouldBe` (10000 :: Int)
haskell-compat/base-compat
base-compat-batteries/test/Data/Foldable/CompatSpec.hs
mit
303
0
15
78
99
54
45
10
1
module Main where -- module under test import Data.DTW import Data.List import Data.Functor import Test.Framework import Test.Framework.Providers.QuickCheck2 import Test.QuickCheck import qualified Data.Vector.Unboxed as V newtype SmallNonEmptySeq a = SmallNonEmptySeq { getSmallNonEmpty :: V.Vector a } de...
fhaust/dtw
test/MainTest.hs
mit
3,258
0
15
724
1,007
530
477
51
1