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
-- Implements Jump Point Search module JPS where import qualified Data.Map.Strict as Map import Data.Word import qualified Data.Vector.Unboxed as U import Data.Vector.Unboxed ((!)) import qualified Data.Set as Set import qualified Data.List as L import qualified Data.IntPSQ as PSQ import Grid import Astar import De...
hacoo/haskell-jps
pathfinding/JPS.hs
mit
5,039
0
15
1,590
1,866
952
914
107
2
module Main where import AST import Lexer import Parse import ParseAST import Verify import System.Environment build :: FilePath -> IO () build file = do source <- readFile file print $ run parseModule $ lexer file source main :: IO () main = do args <- getArgs case args of ["version"] -> putStrLn "nickel 0.0....
Nathan-Fenner/New-Nickel
Main.hs
mit
459
0
10
94
152
77
75
19
4
module Light.Camera.PerspectiveCamera ( PerspectiveCamera, perspectiveCamera, perspectiveVerticalFOV ) where import Light.Camera import Light.Film import Light.Geometry data PerspectiveCamera = PerspectiveCamera { perspectiveTransform :: Transform , perspectiveFilm ...
jtdubs/Light
src/Light/Camera/PerspectiveCamera.hs
mit
1,240
0
12
387
339
183
156
24
1
-- A circuit that is constructive in the initial state but not in the second. module T where import Tests.Basis c = proc () -> do boot <- delayAC falseA trueA -< () combLoop (dupA <<< notA <<< andA) -< boot -- Check a relatively small number of sequence lengths. test_correct = let prop n = ...
peteg/ADHOC
Tests/02_SequentialCircuits/025_nonconstructive_reachable_state.hs
gpl-2.0
531
1
14
146
171
84
87
-1
-1
module Handler.Semesters where import Import import Control.Types import Data.Time (getCurrentTime) import Autolib.Util.Sort (sortBy) getSemestersR :: SchuleId -> Handler Html getSemestersR schuleId = do semesters <- runDB $ selectList [SemesterSchuleId ==. schuleId] [] zeit <- liftIO $ getCurrentTime let seme...
marcellussiegburg/autotool
yesod/Handler/Semesters.hs
gpl-2.0
1,526
0
17
277
448
219
229
-1
-1
{-# LANGUAGE PatternGuards, CPP, ScopedTypeVariables #-} {- Copyright (C) 2010-2014 John MacFarlane <jgm@berkeley.edu> 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,...
nickbart1980/pandoc
src/Text/Pandoc/Writers/EPUB.hs
gpl-2.0
50,073
0
27
17,580
13,694
7,478
6,216
1,024
30
{- # This file is part of matrix-arbitrary. # # # # matrix-arbitrary is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by ...
weissi/matrix-arbitrary
src/empty-file-template.hs
gpl-3.0
1,336
0
2
698
4
3
1
1
0
module Data.Ephys.Timeseries.Filter where -- Order of constructor arguments supposed to match natural -- language for specifying filters, e.g. "4th order Lowpass Eliptical filter" data FilterSpec = FilterSpec Sharpness Response Family deriving (Eq, Show) data Response = LowPass Double |...
imalsogreg/tetrode-ephys
lib/Data/Ephys/Timeseries/Filter.hs
gpl-3.0
676
0
6
224
126
73
53
15
0
module Hledger ( module Hledger.Data ,module Hledger.Read ,module Hledger.Reports ,module Hledger.Utils ) where import Hledger.Data import Hledger.Read import Hledger.Reports import Hledger.Utils
Lainepress/hledger
hledger-lib/Hledger.hs
gpl-3.0
257
0
5
82
50
32
18
9
0
module AllTests (tests) where import Data.Aeson import Data.Text hiding (length) import Grapher import Jparse import Test.Tasty import Test.Tasty.QuickCheck as QC -- | Use a sized generator to generate a list of values whose combined size -- matches the g...
ouanixi/order-deps
test-suite/AllTests.hs
gpl-3.0
1,953
0
12
664
419
225
194
29
1
-- | Unify support for type ASTs {-# LANGUAGE NoImplicitPrelude #-} module Lamdu.Infer.Internal.Unify ( unifyUnsafe ) where import Prelude.Compat import Control.Lens.Operators import Control.Monad (when, unless) import Control.Monad.Trans.Class (lift) import C...
da-x/Algorithm-W-Step-By-Step
Lamdu/Infer/Internal/Unify.hs
gpl-3.0
7,879
0
19
2,555
2,498
1,274
1,224
167
4
module UCeuler2 ( solve ) where -- With an anonymus function that takes a pair (a, b) in a tuple and -- returns a new tuple with (b (+ a b)). -- We iterate over that function, i.e the output is the new input. -- The first position in each pair is the Fibonacci sequence -- that is map(ped) to a new lazy sequence -- Th...
tedhag/teuler
haskell/rest-euler/src/UCeuler2.hs
gpl-3.0
791
0
11
145
172
101
71
8
1
-------------------------------------------------------------------------------- -- This file is part of diplomarbeit ("Diplomarbeit Johannes Weiß"). -- -- -- -- diplomarbeit is free software: you can redistribute it and/or modify ...
weissi/diplomarbeit
lib/Math/Polynomials.hs
gpl-3.0
2,372
0
12
885
253
153
100
21
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-drive/gen/Network/Google/Resource/Drive/Revisions/Get.hs
mpl-2.0
4,782
0
24
1,316
661
375
286
102
1
initials :: [Char] -> [Char] -> [Char] initials (f:_) (l:_) = (f : ". ") ++ (l : ".")
ekalosak/haskell-practice
helloWorld/baby2.hs
lgpl-3.0
86
0
7
19
65
36
29
2
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE Sta...
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/trees-that-grow-and-shrink/2017-09-spj-trees-that-grow/TTG.hs
unlicense
9,699
0
15
2,520
2,088
1,125
963
-1
-1
module Functions where j :: Monad m => m (m a) -> m a j m = m >>= id l1 :: Monad m => (a -> b) -> m a -> m b l1 = fmap l2 :: Monad m => (a -> b -> c) -> m a -> m b -> m c l2 f ma mb = f <$> ma >>= (<$> mb) a :: Monad m => m a -> m (a -> b) -> m b --a ma mf = mf >>= (\f -> ma >>= (\m -> return $ f m)) a = (=<<) . fl...
thewoolleyman/haskellbook
18/07/haskell-club/Functions.hs
unlicense
650
0
10
194
434
222
212
17
1
{- Copyright 2015 Tristan Aubrey-Jones 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 writing, sof...
flocc-net/flocc
v0.1/Compiler/Back/ControlTemplates.hs
apache-2.0
4,775
0
31
1,228
1,095
562
533
75
1
{- | Module : Bio.Motions.Callback.Class Description : Contains the definitions of various 'Callback'-related primitives. License : Apache Stability : experimental Portability : unportable -} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE Cons...
Motions/motions
src/Bio/Motions/Callback/Class.hs
apache-2.0
3,693
0
12
718
707
390
317
52
1
module Data.Real.Base (Base, approxBase, powers, sumBase) where import Data.Real.Gauge import Data.Ratio import Data.Bits import Test.QuickCheck import GHC.Real type Base = Rational approxBase :: Base -> Gauge -> Base approxBase x e | 0 < err = (round $ x*(fromIntegral ((1::Integer) `shiftL` (err)))) % ...
robbertkrebbers/fewdigits
Data/Real/Base.hs
bsd-2-clause
1,794
0
15
515
965
522
443
-1
-1
module BruijnEnvironment where import qualified Data.IntMap as IM import Control.Exception.Base import Data.Maybe import Data.List -- add some test -- TODO remove b prefix and give beter names -- TODO consistend inuative order in BruijnEnv -- defs / bfromlist is [2,1,0] -- Reorder ? -- | Bound is wrapper arroun...
kwibus/myLang
src/BruijnEnvironment.hs
bsd-3-clause
4,705
0
15
1,051
1,720
907
813
86
2
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 701 {-# LANGUAGE Trustworthy #-} #endif -- -- | -- Module : Data.String.UTF8 -- Copyright : (c) Iavor S. Diatchki 2009 -- License : BSD3-style (see LICENSE) -- -- Maintainer : emertens@galois.com -- Stability : experimental -- Portability : portable --...
ghc/packages-utf8-string
Data/String/UTF8.hs
bsd-3-clause
6,277
0
10
1,376
1,446
771
675
87
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE TemplateHaskell #-} module Scripts.Opts ( setTimeout , module Scripts.Opts ) where import ClassyPrelude import Options.Applicati...
limaner2002/EPC-tools
USACScripts/src/Scripts/Opts.hs
bsd-3-clause
22,963
0
25
4,546
5,130
2,624
2,506
-1
-1
module Buffer ( Arena , prepareArena , prepareDummyArena , getBuffer , borrowBuffer , returnBuffer ) where import Control.Applicative ((<$>)) import Control.Monad (replicateM) import Data.IORef (IORef, newIORef, atomicModifyIORef) import Foreign.ForeignPtr (mallocForeignPtrBytes) import Types newtype...
kazu-yamamoto/witty
src/Buffer.hs
bsd-3-clause
990
0
10
202
330
176
154
31
3
{-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE UndecidableInstances #-} -- | Generic representation of EDSL syntax. The types 'Term' and 'TERM' represent abstract syntax. -- The functions 'smartConstr' and 'smartSugar' are used to define smart constructors, which can be -- thought of as the concrete EDSL syntax. -...
emilaxelsson/compass
src/Language/Embedded/Syntax.hs
bsd-3-clause
7,721
0
12
1,820
1,743
981
762
-1
-1
{-# LANGUAGE ForeignFunctionInterface #-} ------------------------------------------------------------------------------- -- | -- Copyright : (c) 2015 Michael Carpenter -- License : BSD3 -- Maintainer : Michael Carpenter <oldmanmike.dev@gmail.com> -- Stability : experimental -- Portability : portable -- -...
oldmanmike/CsoundRaw
src/Sound/Csound/ScoreHandling.hs
bsd-3-clause
2,428
0
9
293
353
194
159
21
1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE OverloadedStrings #-} module Reporting.Error.Publish ( Error(..) , toReport ) where import qualified Text.PrettyPrint.ANSI.Leijen as P import Text.PrettyPrint.ANSI.Leijen ((<>)) import Deps.Diff (Magnitude, magnitudeToString) import qualified Elm.Package as Pkg import q...
evancz/builder
src/Reporting/Error/Publish.hs
bsd-3-clause
9,038
0
19
2,801
1,729
986
743
155
13
{-# LANGUAGE RecordWildCards #-} module Day21 where {- Day 21: RPG Simulator 20XX -} data Player = Player { hp :: Int, dmg :: Int, armor :: Int, price :: Int} deriving (Eq) data Weapon = Weapon { costw :: Int, dmgw :: Int } deriving (Eq) data Armor = Armor { costa :: Int, armora :: Int } deriving (Eq) data Ring = Ri...
Rydgel/advent-of-code
src/Day21.hs
bsd-3-clause
2,494
0
12
1,100
917
480
437
57
2
{-# LANGUAGE QuasiQuotes #-} import LiquidHaskell data Bob = B {foo :: Int} [lq| data Bob = B {foo :: Int} |] [lq| foo :: x:Bob -> {v:Int | v = foo x} |] [lq| invariant {v:Bob | foo v == 10} |] mk :: a -> Bob mk = undefined [lq| propFAIL :: {v:_ | foo v = 10} |] propFAIL = mk () [lq| propOK :: {v:_ | foo v = ...
spinda/liquidhaskell
tests/gsoc15/unknown/pos/invlhs.hs
bsd-3-clause
358
0
10
97
100
60
40
12
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} module Glug.Net ( realTlsGetUrl ) where import qualified Data.ByteString.Lazy as BSL import qualified Network.HTTP.Conduit as C import Control.Concurrent (threadDelay) import Control.Monad.Except (MonadError, throwError) import Control.Monad.IO.C...
robmcl4/Glug
src/Glug/Net.hs
bsd-3-clause
1,654
0
13
540
348
188
160
30
2
-- Fishtank: 3D OpenGL demo with flocking boids -- Author: Matthew Danish. License: BSD3 (see LICENSE file) -- -- Assorted convenience utility functions. module Util where import Graphics.Rendering.OpenGL.GL import Data.List (foldl') import System.Random type Vector3d = Vector3 GLdouble uncurry3 f (a, b, c) = f a b...
mrd/fishtank
Util.hs
bsd-3-clause
2,327
0
13
593
1,090
565
525
49
1
module Data.Profiles where import Model fridge :: MachineDescription fridge = MachineDescription { name = "Philipp G. Fridge" , behavior = [ ("On", Repeat (square 0 2 100 2)) , ("Standby", Once $ constant 15) , ("Off", Once $ constant 0) ] , transitions = [ ("On", "Off",...
redelmann/e-zimod-server
Data/Profiles.hs
bsd-3-clause
563
0
11
225
185
116
69
14
1
{-# LANGUAGE FlexibleContexts #-} module Cloud.AWS.EC2.Region ( describeRegions ) where import Data.Text (Text) import Data.Conduit import Control.Applicative import Control.Monad.Trans.Resource (MonadResource, MonadBaseControl) import Cloud.AWS.Lib.Parser.Unordered ((.<)) import Cloud.AWS.EC2.Internal imp...
worksap-ate/aws-sdk
Cloud/AWS/EC2/Region.hs
bsd-3-clause
884
0
12
180
213
126
87
25
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module API where import Control.Monad (unless) import Control.Monad.Trans (liftIO) import Control.Monad.Trans.Either (EitherT, left) import Crypto.Hash.SHA256 (hash) import ...
yemi/fabian-blog
server/Api.hs
bsd-3-clause
3,294
0
15
1,026
859
449
410
71
3
module Data.HashPSQ ( -- * Type HashPSQ -- * Query , null , size , member , lookup , findMin -- * Construction , empty , singleton -- * Insertion , insert -- * Delete/update , delete , alter , alterMin -- * Lists , fromList ...
meiersi/psqueues-old
src/Data/HashPSQ.hs
bsd-3-clause
577
0
5
252
100
69
31
24
0
{-# LANGUAGE OverloadedStrings #-} module SearchRepos where import qualified Github.Search as Github import qualified Github.Data as Github import Control.Monad (forM,forM_) import Data.Maybe (fromMaybe) import Data.List (intercalate) import System.Environment (getArgs) import Text.Printf (printf) import Data.Time.Clo...
thoughtbot/github
samples/Search/SearchRepos.hs
bsd-3-clause
1,996
0
18
529
618
328
290
47
3
module Web.Dom.Types where import Data.Text (Text) data NodeType = El | Tx -- | Type synonym for 'Text' which indicates a tag name. type Tag = Text -- | Type synonym for 'Text' which indicates a id. type Id = Text -- | Type synonym for 'Text' which indicates a class. type Class = Text -- | Type sy...
tel/reactional
src/Web/Dom/Types.hs
bsd-3-clause
390
0
5
93
55
37
18
7
0
{-# LANGUAGE OverloadedStrings #-} import Test.Framework (defaultMain) import Test.HTMLTests import Property.HTMLProperties import Property.ParserProperties tests = [ htmlTests , htmlProperties , parserProperties ] main :: IO () main = defaultMain tests
qnnguyen/howser
test/Spec.hs
bsd-3-clause
281
0
6
57
59
34
25
10
1
{-# LANGUAGE OverloadedStrings #-} module IrcScanner.EditKeywordsPage where import IrcScanner.Types as TY import Snap import Snap.Snaplet.Heist import Control.Lens import Control.Monad.IO.Class(liftIO) --import Control.Monad.Trans(lift) import Control.Monad.Reader(ask,lift) import Data.IO...
redfish64/IrcScanner
src/IrcScanner/EditKeywordsPage.hs
bsd-3-clause
3,433
0
20
684
936
480
456
74
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Typ...
Garygunn94/DFS
DirectoryServer/.stack-work/intero/intero234673Fi.hs
bsd-3-clause
9,551
38
18
2,391
2,256
1,172
1,084
205
3
module Ten where import SubsetSelection(getSubset) import Histogram import QaryGraphs unQ :: Qary -> Int unQ (Qary n) = n updown :: [Int] -> [Bool] updown (x : y : zs) = (y >= x) : updown (y:zs) updown _ = [] f :: Int -> [Int] -> Int f n xs = rem (sum . getSubset [1..] $ updown xs) n g :: Int -> [Int] -> Int g q x...
cullina/Extractor
src/Ten.hs
bsd-3-clause
465
0
10
122
280
144
136
16
1
{-# LANGUAGE OverloadedStrings #-} module Tinc.ConfigSpec where import Test.Hspec import Test.Mockery.Directory import Tinc.Config spec :: Spec spec = do describe "getAdditionalDependencies" $ do it "return additional dependencies from tinc.yaml" $ do inTempDirectory $ do ...
robbinch/tinc
test/Tinc/ConfigSpec.hs
mit
650
0
20
192
129
65
64
18
1
module Domain.Product where import Import import Domain.Types createProduct :: Product -> AppM(Product) createProduct product = undefined editProduct :: Product -> AppM(Product) editProduct product = undefined getProduct :: ProductID -> AppM(Product) getProduct pid = undefined data ProductFilter = ProductFilter {...
vacationlabs/haskell-webapps
skeleton/src/Domain/Product.hs
mit
635
0
9
214
140
79
61
14
1
-- https://www.codewars.com/kata/one-function-many-arguments-haskell-style {-# LANGUAGE InstanceSigs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FunctionalDependencies #-} module PolyvariadicFunctions where ...
airtial/Codegames
codewars/one-function-many-arguments-haskell-style.hs
gpl-2.0
767
0
10
161
277
150
127
-1
-1
--- * -*- outline-regexp:"--- \\*"; -*- --- ** doc -- In Emacs, use TAB on lines beginning with "-- *" to collapse/expand sections. {-| File reading/parsing utilities used by multiple readers, and a good amount of the parsers for journal format, to avoid import cycles when JournalReader imports other readers. Some of...
simonmichael/hledger
hledger-lib/Hledger/Read/Common.hs
gpl-3.0
66,485
1
26
14,050
13,143
6,869
6,274
929
6
-------------------------------------------------------------------------------- -- | -- Module : Data.IDX -- Copyright : Christof Schramm -- License : GPL v 3 -- -- Maintainer : Christof Schramm <christof.schramm@campus.lmu.de> -- Stability : Experimental -- Portability : Should work in all common Haskell impleme...
kryoxide/mnist-idx
src/Data/IDX.hs
lgpl-3.0
4,250
0
13
1,300
832
465
367
73
2
{-# LANGUAGE OverloadedStrings #-} module Api.Server where import Api.Budgets import Api.Error import Api.Util import Snap.Core import Snap.Http.Server main :: IO () main = serve =<< commandLineConfig emptyConfig serve :: Config Snap a -> IO () serve config = httpServe config $ route [ ("budgets", ...
Geeroar/ut-haskell
src/Api/Server.hs
apache-2.0
794
0
12
201
227
114
113
22
2
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Texturing.TexParameter -- Copyright : (c) Sven Panne 2002-2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability ...
mfpi/OpenGL
Graphics/Rendering/OpenGL/GL/Texturing/TexParameter.hs
bsd-3-clause
4,868
0
14
841
1,044
556
488
97
21
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[InstEnv]{Utilities for typechecking instance declarations} The bits common to TcInstDcls and TcDeriv. -} {-# LANGUAGE CPP, DeriveDataTypeable #-} module InstEnv ( DFunId, InstMatch, ClsInstLookupResult, ...
sgillespie/ghc
compiler/types/InstEnv.hs
bsd-3-clause
40,624
0
15
10,370
3,918
2,183
1,735
-1
-1
fibonacci n | n <= 1 = n | n > 1 = fibonacci (n-1) + fibonacci (n-2)
sushantmahajan/programs
haskell/first.hs
cc0-1.0
72
0
9
21
56
26
30
2
1
------------------------------------------------------------------------------- -- | -- Module : System.Hardware.Haskino.Test.ExprWord32 -- Copyright : (c) University of Kansas -- License : BSD3 -- Stability : experimental -- -- Quick Check tests for Expressions returning a Expr Word32 ----------------...
ku-fpg/kansas-amber
tests/ExprTests/ExprInt32.hs
bsd-3-clause
15,947
0
19
4,277
6,125
2,810
3,315
406
2
module Distribution.Nixpkgs.Haskell.Constraint ( Constraint, satisfiesConstraint, satisfiesConstraints ) where import Distribution.Package import Distribution.Version import Distribution.Nixpkgs.Haskell.OrphanInstances ( ) type Constraint = Dependency satisfiesConstraint :: PackageIdentifier -> Constraint -> Boo...
Fuuzetsu/cabal2nix
src/Distribution/Nixpkgs/Haskell/Constraint.hs
bsd-3-clause
543
0
7
63
137
79
58
10
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="de-DE"> <title>All In One Notes Add-On</title> <maps> <homeID>top</homeID> <mapref loca...
thc202/zap-extensions
addOns/allinonenotes/src/main/javahelp/org/zaproxy/zap/extension/allinonenotes/resources/help_de_DE/helpset_de_DE.hs
apache-2.0
968
77
67
159
417
211
206
-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="hu-HU"> <title>Directory List v2.3 LC</title> <maps> <homeID>directorylistv2_3_lc</homeID> ...
kingthorin/zap-extensions
addOns/directorylistv2_3_lc/src/main/javahelp/help_hu_HU/helpset_hu_HU.hs
apache-2.0
984
78
66
158
414
210
204
-1
-1
{- Refactoring: move the definiton 'fringe' to module C1. This example aims to test the moving of the definition and the modification of export/import -} module D6(fringe, sumSquares) where import C6 fringe :: Tree a -> [a] fringe (Leaf x) = [x] fringe (Branch left right) = fringe left ++ fringe right ...
SAdams601/HaRe
old/testing/moveDefBtwMods/D6.hs
bsd-3-clause
439
0
7
125
126
66
60
9
1
-- Copyright (C) 2015 Michael Alan Dorman <mdorman@ironicdesign.com> -- This file is not part of GNU Emacs. -- 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 3 of the License, ...
robin-liu-1983/emacs-robin.d
emacs.d/elpa/flycheck-haskell-20160118.851/get-flags.hs
mit
1,434
0
11
287
254
142
112
24
2
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -dth-dec-file #-} module T8624 (THDec(..)) where import Language.Haskell.TH $(return [DataD [] (mkName "THDec") [] [NormalC (mkName "THDec") []] []])
urbanslug/ghc
testsuite/tests/th/T8624.hs
bsd-3-clause
201
0
13
27
73
40
33
5
0
{-# LANGUAGE Arrows, ViewPatterns #-} module T3964 where import Control.Arrow testF :: Eq a => a -> (Maybe (Maybe a)) -> Maybe a testF v = proc x -> case x of Just (Just ((==v) -> True)) -> returnA -< Just v _ -> returnA -< Nothing
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/arrows/should_compile/T3964.hs
bsd-3-clause
271
1
14
86
107
55
52
7
2
{-# LANGUAGE TypeFamilies #-} module OverC where import OverA (C, D) data instance C [a] [Int] = C9ListList type instance D [a] [Int] = Char
siddhanathan/ghc
testsuite/tests/indexed-types/should_fail/OverC.hs
bsd-3-clause
144
0
6
28
54
33
21
5
0
module Http.Tests.Request (tests) where ------------------------------------------------------------------------------ import qualified Http.Request as Request import Test.Framework import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test)...
ndreynolds/hsURL
test/Http/Tests/Request.hs
mit
617
0
8
116
93
58
35
9
1
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Text.Greek.IO.Process where import Prelude hiding (words) import Control.Monad.Except import Data.Map (Map) import Text.Greek.IO.Stage import Text.Greek.Source.FileReference import qualified Control.Lens a...
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/IO/Process.hs
mit
37,505
0
21
4,966
10,347
5,375
4,972
443
1
module Buffer.Backend.MinMax ( minMaxBuffer , minMaxBufferBy ) where import Buffer.Internal.Types -- | A MinMaxBuffer only holds at most two elements at a time, the max and the -- min, in whatever order they arrive in. data MinMaxBuffer a = Nil | Single a | Pair a a -- | Put function for orderable type...
SilverSylvester/cplot
src/Buffer/Backend/MinMax.hs
mit
1,856
0
11
484
478
262
216
-1
-1
module ProjectEuler.Problem36 ( problem ) where import Petbox import ProjectEuler.Types problem :: Problem problem = pureProblem 36 Solved result result :: Int result = sum [ x | x <- [1..1000000-1] -- the ordering is intentional: it's more likely and efficient -- to check for decimals before checki...
Javran/Project-Euler
src/ProjectEuler/Problem36.hs
mit
398
0
10
88
97
53
44
12
1
{-# LANGUAGE CPP, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module System.Process.Text.Builder where #if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>)) #endif import Control.DeepSeq (force) import qualified Control.Exception as C (evaluate) import Data.ListLike.IO (hGetContents) impo...
seereason/process-extras
src/System/Process/Text/Builder.hs
mit
1,438
0
9
296
244
152
92
27
1
main = do let a = "initial" putStrLn a let b = 1 let c = 2 print b >> print c let d = True print d let e = undefined :: Int print e let f = "short" putStrLn f
theDrake/haskell-experiments
variables.hs
mit
185
0
9
68
100
42
58
12
1
module Zipper ( BinTree(BT) , fromTree , left , right , setLeft , setRight , setValue , toTree , up , value ) where data BinTree a = BT { btValue :: a , btLeft :: Maybe (BinTree a) , btRight :: Maybe (BinTree a) } deriving (Eq, Show) data Zipper ...
exercism/xhaskell
exercises/practice/zipper/src/Zipper.hs
mit
1,261
0
11
308
401
203
198
36
1
{-# LANGUAGE QuasiQuotes, ScopedTypeVariables #-} module Handler.NewTrip where import Import import Utils.Database import Utils.Users import Yesod.Form.Bootstrap3 import qualified Hasql as H import qualified Data.Text as T getNewTripR :: Handler Html getNewTripR = do req <- waiRequest restrictToAdmins req ...
dgonyeo/brandskell
Handler/NewTrip.hs
mit
2,727
0
27
1,093
717
360
357
59
5
{-# LANGUAGE TemplateHaskell, RankNTypes #-} module Minesweeper.Game where import Minesweeper.Board import Minesweeper.Cell import Control.Lens import Control.Monad.State import Data.Maybe import qualified Data.Vector as Vector (concat, toList) import System.Random data Game = Game { _board :: Board , _rema...
mattdonnelly/CS4012-Minesweeper
src/Minesweeper/Game.hs
mit
3,261
0
17
1,058
916
454
462
-1
-1
module Protop.Logic.BuilderSpec (spec) where import Control.Monad ((>=>)) import Protop.Logic import Test.Hspec spec :: Spec spec = do morMSpec prfMSpec lamSMSpec sgmSMSpec lamMSpec appMSpec sgmMSpec morMSpec :: Spec morMSpec = describe "morM" $ do it "should properly lift objects" $...
brunjlar/protop
test/Protop/Logic/BuilderSpec.hs
mit
3,401
0
24
1,460
1,066
534
532
97
1
module Handler.AdminSpec (spec) where import TestImport spec :: Spec spec = withApp $ do describe "getAdminR" $ do error "Spec not implemented: getAdminR" describe "postAdminR" $ do error "Spec not implemented: postAdminR"
swamp-agr/carbuyer-advisor
test/Handler/AdminSpec.hs
mit
253
0
11
62
60
29
31
8
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE Rank2Types #-} {-# LANGUAGE TypeFamilies #-} {- | Module: Internal.BuildPure Description: Helpers for building capnproto messages in pure code. This module provides some helpers for buildi...
zenhack/haskell-capnp
lib/Internal/BuildPure.hs
mit
2,007
0
15
394
412
228
184
26
2
{-# LANGUAGE EmptyDataDecls, ForeignFunctionInterface, JavaScriptFFI, OverloadedStrings, DeriveDataTypeable #-} module JavaScript.Web.Canvas ( Context , Canvas , Image , TextAlign(..) , Te...
ghcjs/ghcjs-base
JavaScript/Web/Canvas.hs
mit
15,509
192
14
4,548
3,872
2,018
1,854
361
6
{-# LANGUAGE BangPatterns, DataKinds, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Hadoop.Protos.ContainerManagementProtocol.ContainerManagementProtocolService (ContainerManagementProtocolService, containerManagementProtocolService, StartCon...
alexbiehl/hoop
hadoop-protos/src/Hadoop/Protos/ContainerManagementProtocol/ContainerManagementProtocolService.hs
mit
2,526
0
7
226
304
201
103
37
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts, FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} ----------------------------------------------------------------------------- -- | -- Module : Reactive.Banana.JsHs.Types -- Copyright : (c) Artem C...
mb21/qua-kit
libs/hs/reactive-banana-ghcjs/src/Reactive/Banana/JsHs/Types.hs
mit
3,335
24
10
561
576
360
216
55
0
import Data.List import Data.Char import Data.Maybe import Data.Either import Data.List.Utils main = do contents <- readFile "day10input.txt" let result = compute $ lines contents print result type Value = Int type BotID = Int type Bot = (BotID, [Value]) type GiveInstruction = (BotID...
aBhallo/AoC2016
Day 10/day10part2.hs
mit
2,552
0
12
586
1,103
588
515
65
2
{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GeneralizedNewtypeDeriving, MultiParamTypeClasses, NoMonomorphismRestriction, TypeSynonymInstances #-} module Yi.Snippets where import Prelude () import Yi.Prelude import Control.Arrow import Control.Monad.RWS hiding...
codemac/yi-editor
src/Yi/Snippets.hs
gpl-2.0
12,852
0
21
3,905
3,853
1,906
1,947
297
4
module Network.Gitit2.Handler.Random ( getRandomR ) where import Control.Monad (filterM) import Data.FileStore (index) import Network.Gitit2.Import import System.Random (randomRIO) getRandomR :: HasGitit master => GH master Html getRandomR = do fs <- filestore <$> getYesod files <- liftIO $ index fs pages <...
thkoch2001/gitit2
Network/Gitit2/Handler/Random.hs
gpl-2.0
553
0
13
119
182
92
90
15
1
{-# LANGUAGE OverloadedStrings #-} module PeerThreadMock ( peerThreadMain ) where import Prelude hiding (readFile) -- import Test.Tasty.HUnit (testCase, (@?=)) -- -- import FuncTorrent.ControlThread import Control.Concurrent import Control.Lens import System.Timeout import Data.IORef import System.IO import...
dfordivam/functorrent
test/PeerThreadMock.hs
gpl-3.0
867
0
13
186
202
103
99
29
5
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- 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
designer/source/Game/LevelPuzzleMode/LevelPuzzleWorld/OutputState.hs
gpl-3.0
1,150
0
5
175
52
45
7
4
0
{-# LANGUAGE NoMonomorphismRestriction#-} {-# LANGUAGE NoImplicitPrelude #-} module Bamboo.Theme.MiniHTML5.Widget.Template (page) where import Bamboo.Theme.MiniHTML5.Env hiding (navigation, sidebar) import Bamboo.Helper.StateHelper hiding (uri) import Bamboo.Type.State import Web.HCheat import Text.HTML.Moe.DSL.Kawaii...
nfjinjing/bamboo-theme-mini-html5
src/Bamboo/Theme/MiniHTML5/Widget/Template.hs
gpl-3.0
2,711
5
27
672
817
422
395
64
3
module P14TaxCalc where import Control.Monad (when) -- to meet constraint of having no "else" clause but note that -- without mutation you have to faff some to make it work import Library main :: IO () main = do amt <- promptNonNegFloat "Amount: " state <- promptS "State:...
ciderpunx/57-exercises-for-programmers
src/P14TaxCalc.hs
gpl-3.0
641
0
12
205
153
77
76
15
1
{-# LANGUAGE ViewPatterns #-} module Run.MutTest (runMutTest) where import Prelude hiding (writeFile) import Data.ByteString.Lazy hiding (putStrLn) import Data.List hiding (length) import Data.Maybe import GHC.Int import Control.Monad import Control.DeepSeq import System.Directory import Test.QuickFuzz.Gen.FormatI...
CIFASIS/QuickFuzz
app/Run/MutTest.hs
gpl-3.0
3,440
0
19
1,080
605
313
292
51
3
module HEP.Automation.MadGraph.Dataset.Set20110315set12 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 :: ...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110315set12.hs
gpl-3.0
1,694
0
10
409
356
219
137
46
1
{- ****************************************************************************** * I N V A D E R S * * * * Module: IdentityList * *...
keera-studios/pang-a-lambda
Experiments/collisions/Data/IdentityList.hs
gpl-3.0
6,679
0
12
2,038
1,696
943
753
93
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-accessapproval/gen/Network/Google/Resource/AccessApproval/Organizations/ApprovalRequests/Dismiss.hs
mpl-2.0
6,293
0
16
1,324
785
461
324
117
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-customsearch/gen/Network/Google/Resource/Search/CSE/Siterestrict/List.hs
mpl-2.0
27,473
0
47
9,287
3,247
1,882
1,365
463
1
module Codewars.Kata.Convert where digitize :: Int -> [Int] digitize s |s < 10 = [s] |otherwise = mod s 10 : digitize (div s 10) --
ice1000/OI-codes
codewars/101-200/convert-number-to-reversed-array-of-digits.hs
agpl-3.0
145
0
9
39
70
36
34
4
1
module Data.GI.CodeGen.Util ( prime , parenthesize , padTo , withComment , ucFirst , lcFirst , modifyQualified , tshow , terror , utf8ReadFile , utf8WriteFile , splitOn ) where import Data.Monoid ((<>)) import Data.Char (toLower, toUpper) import qualified Data.ByteString as B import Da...
ford-prefect/haskell-gi
lib/Data/GI/CodeGen/Util.hs
lgpl-2.1
2,461
0
15
648
773
413
360
59
3
module Main where import GLua.Lexer import GLua.TokenTypes import GLua.Parser import GLua.AG.PrettyPrint import Data.Char import System.FilePath import System.Environment import System.IO import System.Exit import Control.Monad help = unlines ["", "Usage: GLuaParser <ACTION> <FILE>", "", "Possible actions:", " ...
FPtje/LuaAnalysis
analysis/src/GLua/Main.hs
lgpl-2.1
1,231
0
15
354
341
162
179
40
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE...
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/type-level/2019-04-travis-whitaker-discovering-datakinds-at-runtime/src/HC2.hs
unlicense
1,581
0
13
459
461
246
215
34
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module DeployR( module DeployR.API , module DeployR.Types ) where -- this is an umbrella module import DeployR.Types -- Data types for the API import DeployR.API ...
jberthold/deployR-hs
src/DeployR.hs
apache-2.0
2,796
0
16
693
594
311
283
58
1
-- main = putStrLn "hello, world outside ghc" -- main = do -- putStrLn "Hello, what's your name?" -- name <- getLine -- putStrLn ("Hey " ++ name ++ ", you rock!") -- import Data.Char -- -- main = do -- putStrLn "What's your first name?" -- firstName <- getLine -- putStrLn "What's your last na...
sharkspeed/dororis
languages/haskell/LYHGG/9-input-and-output/helloworld.hs
bsd-2-clause
2,144
0
9
649
119
95
24
6
1
-- | Primitive polynomial sequences. -- -- <https://en.wikipedia.org/wiki/Primitive_polynomial_(field_theory)> -- <http://www.ams.org/journals/mcom/1962-16-079/S0025-5718-1962-0148256-1/S0025-5718-1962-0148256-1.pdf> module PrimitivePolynomial ( sequence , Gen(next) ) where import Data.Bits (FiniteBits...
supki/primitive-polynomial
src/PrimitivePolynomial.hs
bsd-2-clause
1,698
0
14
379
588
339
249
42
1
module Exercises7 where -- Multiple Choice -- 1. d -- 2. b -- 3. d -- 4. b -- 5. a -- Let's write code -- 1. -- a) tensDigit :: Integral a => a -> a tensDigit x = d where xLast = fst (x `divMod` 10) d = snd (xLast `divMod` 10) -- b) Yes, the type signature is the same -- c) hunsDigit :: Integral a ...
pdmurray/haskell-book-ex
src/ch7/Exercises7.hs
bsd-3-clause
1,164
0
10
343
445
248
197
30
2
{- (c) The AQUA Project, Glasgow University, 1994-1998 \section[ErrsUtils]{Utilities for error reporting} -} {-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} module ErrUtils ( -- * Basic types Validity(..), andValid, allValid, isValid, getInvalids, Severity(..), -- * Messages ...
olsner/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
24,597
0
24
7,387
5,276
2,750
2,526
424
6
{-# LANGUAGE CPP #-} #if __GLASGOW_HASKELL__ >= 709 {-# LANGUAGE AutoDeriveTypeable #-} #endif ----------------------------------------------------------------------------- -- | -- Module : Data.Functor.Reverse -- Copyright : (c) Russell O'Connor 2009 -- License : BSD-style (see the file LICENSE) -- -- Ma...
DavidAlphaFox/ghc
libraries/transformers/Data/Functor/Reverse.hs
bsd-3-clause
2,744
0
10
549
879
464
415
42
0
{-# LANGUAGE MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances, DeriveDataTypeable #-} {- ** ********************************************************************* * * * (c) Kathleen Fisher <kathleen.fisher@gmail.com> ...
athleens/pads-haskell
Language/Pads/CoreBaseTypes.hs
bsd-3-clause
13,896
1
24
3,154
4,145
2,197
1,948
336
6
{-# LANGUAGE NoImplicitPrelude #-} import Control.Exception (onException) import Control.Monad (void) import Data.List (isSuffixOf) import System.Environment (getArgs, getProgName) import System.Process import Prelude.Compat chomp :: String -> String chomp s...
Peaker/git-jump
git-jump.hs
bsd-3-clause
1,968
0
15
687
581
294
287
52
3
-- | -- Module : Crypto.Random -- License : BSD-style -- Maintainer : Vincent Hanquez <vincent@snarc.org> -- Stability : stable -- Portability : good -- module Crypto.Random ( -- * Deterministic instances ChaChaDRG , SystemDRG -- * Deterministic Random class , getSystemDRG , dr...
nomeata/cryptonite
Crypto/Random.hs
bsd-3-clause
1,492
0
10
304
264
162
102
26
1
-- -- >>> Main (prep) <<< -- -- This program 'Haskelises' the hub help text. -- -- (c) 2011-2012 Chris Dornan module Main(main) where import System.Locale import Data.Time import Text.Printf main :: IO () main = do cts <- readFile "help.txt" writeFile "Hub/HelpText.hs" $ mk_text_mod "Hub.HelpText" "h...
Lainepress/hub-src
prep.hs
bsd-3-clause
979
0
10
412
234
120
114
21
2