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
{- Merch.Race.Top.MapGen - Map generator screen. Copyright 2013 Alan Manuel K. Gloria This file is part of Merchant's Race. Merchant's Race 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 th...
AmkG/merchants-race
Merch/Race/Top/MapGen.hs
gpl-3.0
5,975
0
19
1,720
1,837
958
879
153
5
-- 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, ...
mrkkrp/flycheck-haskell
get-flags.hs
gpl-3.0
1,967
0
11
390
292
170
122
28
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP #-} {-# LANGUAGE RebindableSyntax, NoMonomorphismRestriction #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE ConstraintKinds #-} module YAPP ( -- * Standard types, classes and related functions -- ** Basic data types Bool(False, True...
bb010g/yapp
src/YAPP.hs
gpl-3.0
14,898
0
13
3,637
5,534
3,436
2,098
-1
-1
module Main where import Control.Monad (when) import System.Exit import Test.Tasty import ScopeTest import TypeCheckerTest import TemplTest import OperatorTest main :: IO () main = defaultMain $ testGroup "Tests" [ testGroup "Unit Tests" [ scopeTests , typeCheckerTests ] , tes...
ikuehne/craeft-hs
test/Main.hs
gpl-3.0
416
0
9
126
88
51
37
14
1
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-} module Model.Identity.TypesTest where -- import Hedgehog -- import qualified Hedgehog.Gen as Gen -- import qualified Hedgehog.Range as Range import Test.Tasty.HUnit import Model.Identity.Types -- import Model.Party.TypesTest -- import Model.Token.TypesTest unit...
databrary/databrary
test/Model/Identity/TypesTest.hs
agpl-3.0
1,201
0
10
151
163
89
74
16
1
module Data.GI.GIR.Function ( Function(..) , parseFunction ) where import Data.Text (Text) import Data.GI.GIR.Callable (Callable(..), parseCallable) import Data.GI.GIR.Parser data Function = Function { fnSymbol :: Text , fnMovedTo :: Maybe Text , fnCallable :: Callable } deriving Sho...
ford-prefect/haskell-gi
lib/Data/GI/GIR/Function.hs
lgpl-2.1
838
0
14
254
223
126
97
26
2
-- Copyright 2014 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 ...
rjwright/js-typeomatic
LabelJSAST.hs
apache-2.0
19,939
0
13
4,070
5,621
3,019
2,602
327
1
repeat' :: a -> [a] repeat' x = x : repeat' x
Oscarzhao/haskell
learnyouahaskell/repeat.hs
apache-2.0
46
0
6
12
28
14
14
2
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QMessageBox_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:21 Warning : this file is machine generated - do...
uduki/hsQt
Qtc/Gui/QMessageBox_h.hs
bsd-2-clause
60,194
0
18
12,814
19,725
9,511
10,214
-1
-1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE RecordWildCards #-} module Data.CRF.Chain2.Pair.FeatMap ( FeatMap (..) ) where import Control.Applicative ((<$>), (<*>)) import Control.Monad (guard) import Data.List (foldl1') import Data.Maybe (c...
kawu/crf-chain2-generic
Data/CRF/Chain2/Pair/FeatMap.hs
bsd-2-clause
2,514
0
16
793
985
540
445
62
2
{-# LANGUAGE RecordWildCards #-} module Node ( rules , Node.FreeSurfer.FreeSurfer (FreeSurfer) , Node.FsInDwi.FsInDwi (FsInDwi) , Node.UKFTractography.UKFTractography (UKFTractography) , Node.WmqlTracts.WmqlTracts (WmqlTracts) , Node.TractMeasures.TractMeasures (..) , Node.Dwi.Dwi (Dwi) ,pathsTractMeasu...
reckbo/ppl
pipeline-lib/Node.hs
bsd-3-clause
2,755
0
12
453
868
494
374
86
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | Utilities for running stack commands. module Stack.Runners ( withGlobalConfigAndLock , withConfigAndLock , withMiniConfigAndLock , withBuildConfigAndLock , wit...
Blaisorblade/stack
src/Stack/Runners.hs
bsd-3-clause
9,018
0
25
2,984
1,793
892
901
174
3
{-# LANGUAGE FlexibleContexts #-} module Obsidian.MonadObsidian.API ((->-), (->>-), threadID, idM, riffle, unriffle, -- oeSplit , -- shuffle, rep, -- iter, -- iter2, fmap, cache, wb, -- ...
svenssonjoel/MonadObsidian
Obsidian/MonadObsidian/API.hs
bsd-3-clause
7,049
0
21
2,765
2,131
1,123
1,008
108
2
module Data.Minecraft.Release18 ( module Data.Minecraft.Release18.Protocol , module Data.Minecraft.Release18.Version ) where import Data.Minecraft.Release18.Protocol import Data.Minecraft.Release18.Version
oldmanmike/hs-minecraft-protocol
src/Data/Minecraft/Release18.hs
bsd-3-clause
213
0
5
21
39
28
11
5
0
{- | Module : SAWScript.SBVParser Description : Parser for .sbv file format. License : BSD3 Maintainer : huffman Stability : provisional -} {-# LANGUAGE ImplicitParams #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TupleSections #-} module SAWScript.SBVParser ( l...
GaloisInc/saw-script
src/SAWScript/SBVParser.hs
bsd-3-clause
16,812
0
23
5,160
5,666
2,789
2,877
328
33
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} module ANTPlus.DeviceProfile.HeartRateMonitor where import ANTPlus.Network import Control.Monad import Control.Concurrent.Async (withAsync) import Control.Concurrent.STM import Data.Bits import Data.Word import qualified ANT...
ocharles/ant-plus
src/ANTPlus/DeviceProfile/HeartRateMonitor.hs
bsd-3-clause
4,487
0
25
1,618
977
496
481
152
7
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Puzzles.PowerSet -- Copyright : (c) Levent Erkok -- License : BSD3 -- Maintainer : erkokl@gmail.com -- Stability : experimental -- -- Test suite for Examples.Puzzles.PowerSet ---------------------...
josefs/sbv
SBVTestSuite/TestSuite/Puzzles/PowerSet.hs
bsd-3-clause
860
0
18
219
185
101
84
10
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} -- | -- Module : Data.Binary.Serialise.CBOR -- Copyright : (c) Duncan Coutts 2015 -- License : BSD3-style (see LICENSE.txt) -- -- Maintainer : duncan@community.haskell.org -- Stability : experimental -- Portability : non-portable (GH...
arianvp/binary-serialise-cbor
Data/Binary/Serialise/CBOR.hs
bsd-3-clause
6,939
0
14
1,525
917
529
388
73
4
module Language.SimPOL.Template.Obs where import Language.SimPOL import qualified Data.POL.Observable as Obs import Control.Monad.Trans.Class at :: Time -> Obs Bool at t = labeled (nullary "time") (lift now) Obs.== constant t before :: Time -> Obs Bool before t = labeled (nullary "time") (lift now) Obs.< constant t aft...
ZjMNZHgG5jMXw/privacy-option-simpol
Language/SimPOL/Template/Obs.hs
bsd-3-clause
740
0
11
128
323
164
159
17
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} module Test.IO.Zodiac.Raw.TSRP where import Data.ByteString (ByteString) import Data.Time (UTCTime) import Disorder.Core.IO (testIO) import Disorder.Core.Property (failWith) i...
ambiata/zodiac
zodiac-raw/test/Test/IO/Zodiac/Raw/TSRP.hs
bsd-3-clause
1,776
0
16
613
395
216
179
46
2
{-# LANGUAGE ScopedTypeVariables, BangPatterns #-} -- K-Means sample from "Parallel and Concurrent Programming in Haskell" -- -- With three versions: -- [ kmeans_seq ] a sequential version -- [ kmeans_strat ] a parallel version using Control.Parallel.Strategies -- [ kmeans_par ] a parallel version using C...
mono0926/ParallelConcurrentHaskell
kmeans/kmeans.hs
bsd-3-clause
10,087
0
19
2,657
2,822
1,442
1,380
196
6
module Main where import Prelude hiding (lookup) import Data.HashMap.Strict (fromList, lookup) import System.Environment type WordString = String type Score = Int letterScores = fromList $ zip ['a'..'z'] [1..] wordScore :: WordString -> Maybe Score wordScore w = sum <$> mapM (\x -> lookup x letterScores) w score10...
Michaelt293/Demotivation
src/Main.hs
bsd-3-clause
824
0
10
170
295
151
144
22
1
module Reactive.Banana.GTK where import BasePrelude import Control.Monad.Trans (liftIO) import Linear import Linear.Affine import qualified Graphics.UI.Gtk as GTK import qualified Reactive.Banana as RB import qualified Reactive.Banana.Frameworks as RB registerDestroy :: (RB.Frameworks t,GTK.WidgetClass w) ...
ocharles/hadoom
hadoom-editor/Reactive/Banana/GTK.hs
bsd-3-clause
3,085
0
25
1,182
923
478
445
81
1
{-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -- -- Copyright (c) 2009-2011, ERICSSON AB -- All rights reserved. -- -- Redistribution and use in source and binary forms,...
rCEx/feldspar-lang-small
src/Feldspar/Core/Constructs/Logic.hs
bsd-3-clause
4,580
0
12
1,122
1,114
566
548
-1
-1
module TinyBlog( module TinyBlog.Config, TinyBlog.app ) where import TinyBlog.Config import TinyBlog.Entry import Data.Maybe import Network.Gravatar import Network.Loli import Network.Loli.Template.TextTemplate import Network.Loli.Utils --import Hack.Contrib.Request import Hack.Contrib.Response import Hack --i...
nsyee00/tinyblog
src/TinyBlog.hs
bsd-3-clause
2,803
0
24
907
649
318
331
58
2
{-# LANGUAGE CPP, BangPatterns, DeriveDataTypeable, FlexibleContexts, FlexibleInstances, GeneralizedNewtypeDeriving, OverloadedStrings, DefaultSignatures, UndecidableInstances, ViewPatterns, NoImplicitPrelude #-} #define NEEDS_INCOHERENT #include "overlapping-compat.h" {-# OPTIONS_GHC -fno-warn-orphans #-} -- TODO...
aelve/json-x
lib/Json/Internal/Instances.hs
bsd-3-clause
49,867
0
36
13,786
15,453
7,968
7,485
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module Backend.InductiveGraph.Probability (toProbBDD, nodeProb) where import Backend.InductiveGraph.InductiveGraph import Control.Arrow (first) import Control.Monad import Data.Graph.Inducti...
vzaccaria/bddtool
src/Backend/InductiveGraph/Probability.hs
bsd-3-clause
2,363
0
16
756
1,029
571
458
68
3
module Internal.HaskellPackage ( Package(..), getPackage, sourceFromHackage ) where import qualified Distribution.Nixpkgs.Haskell.Hackage as DB import qualified Control.Exception as Exception import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Maybe import Data.List ( isSuffixOf, isPrefix...
psibi/cabal2nix
src/Internal/HaskellPackage.hs
bsd-3-clause
6,866
0
21
1,450
1,684
852
832
123
6
-- | This module contains the 'SourceId' wrapper type, that indicate that -- something is identifies a single source of media. This could be an RTP SSRC -- or the IP/Port pair of a network source. The defining characteristic of a -- 'SourceId' is that every thing that has a certain source id stems from **the -- same me...
lindenbaum/mediabus
src/Data/MediaBus/Basics/SourceId.hs
bsd-3-clause
1,927
0
10
387
361
206
155
-1
-1
data A = B :+: B data B = Int :*: Int infixl 6 :+: infixl 7 :*: instance Show A where showsPrec d (b :+: c) | d > 6 = ("(" ++) . showsPrec 7 b . (" :+: " ++) . showsPrec 7 c . (")" ++) | otherwise = showsPrec 7 b . (" :+: " ++) . showsPrec 7 c instance Show B where showsPrec d (m :*: n) | d > 7 = ("(" ++)...
YoshikuniJujo/funpaala
samples/27_basic_type_classes/showBinding0.hs
bsd-3-clause
443
0
11
131
239
124
115
14
0
module VideoCore4.QPU.Instruction.BranchRelative ( BranchRelative , rel_Off , rel_On ) where import Data.Typeable import Data.Word import VideoCore4.QPU.Instruction.Types newtype BranchRelative = BranchRelative { unBranchRelative :: Word8 } deriving (Eq, Show, Typeable) instance ...
notogawa/VideoCore4
src/VideoCore4/QPU/Instruction/BranchRelative.hs
bsd-3-clause
497
0
7
97
111
66
45
15
1
import Data.List import Data.Ord mode :: Ord a => [a] -> a mode = head . maximumBy (comparing length) . group . sort isInt n = n == (fromInteger (round n)) integerRightTriangles cap = mode [p | a <- [1..cap / 2], b <- [1..(cap / 2)], let c = sqrt (a^2 + b^2), ...
JacksonGariety/euler.hs
039.hs
bsd-3-clause
487
0
15
219
205
105
100
11
1
type ListZipper a = ([a], [a]) goForward :: ListZipper a -> ListZipper a goForward (x:xs, bs) = (xs, x:bs) goBack :: ListZipper a -> ListZipper a goBack (xs, b:bs) = (b:xs, bs)
ku00/h-book
src/ListZipper.hs
bsd-3-clause
179
0
7
34
106
59
47
5
1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE Trustworthy #-} module Data.Hexagon.Range (range) where import Control.Lens.Review import Control.Lens.Getter import Control.Lens.Operators import Data.Hexagon.Types range :: (HexCoordinate t a, Integral a) => a -> t a -> [t a] range n c = fmap (view _Coor...
alios/hexagon
src/Data/Hexagon/Range.hs
bsd-3-clause
725
0
16
162
316
170
146
16
1
{-# LANGUAGE TypeOperators #-} module SortOverMorphism where -- ref.) http://www.cs.ox.ac.uk/people/daniel.james/sorting/sorting.pdf import Data.List (partition, unfoldr, delete) pair :: (a -> b) -> (a -> c) -> a -> (b, c) pair f g x = (f x, g x) cross :: (a -> c) -> (b -> d) -> (a, b) -> (c, d) cross f g (x, y) = (f ...
cutsea110/aop
src/SortOverMorphism.hs
bsd-3-clause
9,118
3
14
2,056
4,990
2,512
2,478
204
1
-- Problem 14: Longest Collatz Sequence -- -- https://projecteuler.net/problem=14 -- -- The following iterative sequence is defined for the set of positive integers: -- n → n/2 (n is even) -- n → 3n + 1 (n is odd) -- -- Using the rule above and starting with 13, we generate the following sequence: -- 13 → 40 → 20 → 10 ...
moddy3d/euler
p14/p14.hs
mit
1,246
0
12
289
272
145
127
12
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} module Math.NumberTheory.Primes.SequenceTests ( testSuite ) where import Test.Tasty import Test.Tasty.HUnit import Data.Bits import Data.Maybe import Data.Proxy import Numeric.Natural import Math.Numbe...
Bodigrim/arithmoi
test-suite/Math/NumberTheory/Primes/SequenceTests.hs
mit
5,528
0
14
1,047
1,865
961
904
142
3
{- | Module : $Header$ Description : static analysis of CASL specification libraries Copyright : (c) Till Mossakowski, Uni Bremen 2002-2006 License : GPLv2 or higher, see LICENSE.txt Maintainer : till@informatik.uni-bremen.de Stability : provisional Portability : non-portable(Logic) Static analysi...
keithodulaigh/Hets
Static/AnalysisLibrary.hs
gpl-2.0
44,434
0
40
14,745
13,391
6,766
6,625
881
26
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QDynamicPropertyChangeEvent.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:31 Warning : this file is machine ...
keera-studios/hsQt
Qtc/Core/QDynamicPropertyChangeEvent.hs
bsd-2-clause
2,976
0
12
367
560
296
264
50
1
module Control.Distributed.Process.Extras.Internal.Containers where class (Eq k, Functor m) => Map m k | m -> k where empty :: m a member :: k -> m a -> Bool insert :: k -> a -> m a -> m a delete :: k -> m a -> m a lookup :: k -> m a -> a filter :: (a -> Bool) -> ...
haskell-distributed/distributed-process-extras
src/Control/Distributed/Process/Extras/Internal/Containers.hs
bsd-3-clause
382
0
10
140
180
93
87
-1
-1
-- |This module provides a type and a type class for expressing -- alignment. For concrete uses, see the Table and ProgressBar -- modules. module Graphics.Vty.Widgets.Alignment ( Alignment(..) , Alignable(..) ) where -- |Column alignment values. data Alignment = AlignCenter | AlignLeft | AlignRight ...
KommuSoft/vty-ui
src/Graphics/Vty/Widgets/Alignment.hs
bsd-3-clause
469
0
8
105
71
45
26
7
0
f :: a -> a -> Bool f x y = let z :: b z = y in True
bitemyapp/tandoori
input/rigid.hs
bsd-3-clause
79
0
8
46
44
21
23
4
1
{-# LANGUAGE OverloadedStrings #-} module WebParsing.GraphVisualization (makeGraph) where import Data.Char import qualified Data.Text as T import qualified Data.Text.Lazy as L import Data.Graph.Inductive.Graph import Data.GraphViz import Data.GraphViz.Attributes.Complete import Data.GraphViz.Printing import Data....
Ian-Stewart-Binks/courseography
hs/WebParsing/GraphVisualization.hs
gpl-3.0
2,755
0
16
887
678
360
318
54
1
-- | BigTable benchmark implemented using Hamlet. -- {-# LANGUAGE QuasiQuotes #-} module Main where import Criterion.Main import Text.Hamlet import Text.Hamlet.Monad import Numeric (showInt) import Data.Text (Text) import qualified Data.Text as T import Data.Maybe (fromJust) main = defaultMain [ bench "bigTable" ...
jgm/blaze-html
benchmarks/bigtable/hamlet.hs
bsd-3-clause
724
2
12
175
206
112
94
18
1
module D3 where data Tree a = Leaf a | Branch (Tree a) (Tree a) fringe :: (Tree a) -> [a] fringe (Leaf x) = [x] fringe (Branch left right) = (fringe left) ++ (fringe right) class Same a where isSame :: a -> a -> Bool isNotSame :: a -> a -> Bool instance Same Int where isSame a b = a ==...
kmate/HaRe
old/testing/renaming/D3_AstOut.hs
bsd-3-clause
469
0
8
157
234
123
111
17
1
module T4930 where foo :: Int -> Int foo n = (if n < 5 then foo n else n+2) `seq` n+5
olsner/ghc
testsuite/tests/simplCore/should_compile/T4930.hs
bsd-3-clause
95
0
9
31
53
30
23
4
2
{-# LANGUAGE OverloadedStrings #-} module Handler.Publications where import Import import Text.Blaze.Html5 ((!)) import qualified Text.Blaze.Html5 as H (span, a) import qualified Text.Blaze.Html5.Attributes as A (href, class_) import Text.Parsec.Text () import Text.Parsec (parse) import Text.BibTeX.Parse (splitAuthor...
dudebout/dudeboutdotcom
Handler/Publications.hs
isc
4,386
0
14
1,207
1,208
672
536
-1
-1
module Bot.Component.Command ( simpleCommand , simpleCommandT , emptyCommand , command , commandT , helpForCommand ) where import Bot.Component import Bot.IO import Control.Monad.Trans import Control.Monad.Trans.Identity -- | A convenience function that wraps `command` for commands that don't need to...
numberten/zhenya_bot
Bot/Component/Command.hs
mit
2,329
0
11
719
470
250
220
42
2
module Pretty ( ppexpr, pptype ) where import Check import Syntax import Text.PrettyPrint class Pretty p where ppr :: Int -> p -> Doc pp :: p -> Doc pp = ppr 0 parensIf :: Bool -> Doc -> Doc parensIf True = parens parensIf False = id instance Pretty Expr where ppr p ex =...
JoshuaGross/STILC
Pretty.hs
mit
1,319
0
16
422
622
309
313
45
1
import Data.Char inc x = x + 1 sumList :: [Int] -> Int sumList [] = 0 sumList (x:xs) = x + sumList xs fact :: Int -> Int fact 0 = 1 fact n = n * fact (n - 1) first :: [a] -> a first (x:_) = x member y [] = False member y (x:xs) = y == x || member y xs makeName :: String -> String -> String makeName family first =...
RadoRado/Talks
SoftUniConf2015/examples.hs
mit
637
0
8
156
349
182
167
23
1
module Rebase.Control.Monad.Trans.Writer ( module Control.Monad.Trans.Writer ) where import Control.Monad.Trans.Writer
nikita-volkov/rebase
library/Rebase/Control/Monad/Trans/Writer.hs
mit
122
0
5
12
26
19
7
4
0
#!/usr/bin/env stack -- stack --install-ghc --resolver lts-7.7 runghc import qualified Data.Set as Set {- # Sets -} data State = Alabama | Alaska | Arizona | Arkansas | California | Colorado | Connecticut | Delaware | Florida | Georgia | Hawaii | Idaho | Illinois | Indiana | Iowa | Ka...
lehins/tutorials
Haskell/containers/States.hs
mit
3,765
49
9
759
2,155
1,364
791
157
1
----------------------------------------------------------------------------- -- -- Module : Language.PureScript.TypeChecker.Kinds -- Copyright : (c) Phil Freeman 2013 -- License : MIT -- -- Maintainer : Phil Freeman <paf31@cantab.net> -- Stability : experimental -- Portability : -- -- | -- This modu...
bergmark/purescript
src/Language/PureScript/TypeChecker/Kinds.hs
mit
6,027
0
25
1,300
2,074
1,046
1,028
129
2
-- | Command line tool to process the DSL files. module Main where import AST import Control.Applicative import Control.Monad import Control.Monad (unless) import qualified Data.Set as Set import Errors import Interp import qualifie...
rwoll-hmc/project
src/Main.hs
mit
3,229
0
16
738
866
452
414
59
2
module Proteome.Grep.Process where import Control.Monad.Catch (MonadCatch) import qualified Data.Text as Text import Data.Text (isInfixOf) import Path (Abs, File, Path, parseAbsDir, parseAbsFile, toFilePath) import Path.IO (isLocationOccupied) import Ribosome.Menu.Data.MenuItem (MenuItem) import qualified Streamly.Dat...
tek/proteome
packages/proteome/lib/Proteome/Grep/Process.hs
mit
3,025
0
14
567
952
503
449
-1
-1
{-# LANGUAGE RecordWildCards #-} import Data.Foldable (for_) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Data.List (intercalate) import Proverb (recite) main :: IO () main = hspecWith defaultConfig {configFastFail = True} spec...
exercism/xhaskell
exercises/practice/proverb/test/Tests.hs
mit
3,186
0
9
1,583
468
286
182
58
1
{-# LANGUAGE PatternSynonyms #-} -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module JSDOM.Generated.SVGAnimatedNumber (setBaseVal, getBaseVal, getAnimVal, SVGAnimatedNumber(..), gTypeSVGAnimatedNumber) ...
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGAnimatedNumber.hs
mit
1,886
0
12
218
474
292
182
27
1
{-# LANGUAGE Arrows #-} module Sample1 where import Control.Arrow import Control.CCA.Types import Prelude hiding (init, exp) import qualified Data.List.Stream as S --this was taken from Paul Liu from his CCA paper --http://code.haskell.org/CCA/test/ --I am tring to rewrite these without arrows (normal FRP) --two ...
santolucito/Euterpea_Projects
CCA/Sample1.hs
mit
3,552
7
14
1,010
1,111
564
547
73
2
module Mutrec where -- Mutually recursive functions data T = K f1 :: [T] -> [T] f1 [] = [] f1 (x:xs) = (x : f2 xs) f2 :: [T] -> [T] f2 [] = [] f2 (y:ys) = (y : f1 ys)
antalsz/hs-to-coq
examples/tests/Mutrec.hs
mit
180
0
7
56
116
64
52
8
1
module Irg.Lab2.GL.Utility ( GameState(..), MouseClicks, ReshapeCallback, DisplayCallback, KeyboardCallback, MouseCallback, getWindowSize ) where --import qualified Graphics.GL.Compatibility33 as GL import qualified Graphics.UI.GLUT as GLUT import Data.IORef import Irg.Lab2.Geometry.Shapes getWindowSize...
DominikDitoIvosevic/Uni
IRG/src/Irg/Lab2/GL/Utility.hs
mit
1,029
0
10
158
307
176
131
29
1
{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} -- | Reexports "Data.Proxy.Compat" -- from a globally unique namespace. module Data.Proxy.Compat.Repl.Batteries ( module Data.Proxy.Compat ) where import "this" Data.Proxy.Compat
haskell-compat/base-compat
base-compat-batteries/src/Data/Proxy/Compat/Repl/Batteries.hs
mit
282
0
5
31
29
22
7
5
0
{-# LANGUAGE FlexibleContexts #-} module AmrPutAcc (binom, main) where import qualified Data.Array.Accelerate as A import Data.Array.Accelerate (Z(..), (:.)(..)) import qualified Data.Array.Accelerate.CUDA as ACUDA import Control.DeepSeq (deepseq, NFData) import Control.Monad import System.Environment (getEn...
HIPERFIT/hipermark-benchmarks
benchmarks/american_options/implementations/haskell_accelerate/AmrPutAcc.hs
mit
3,416
0
18
797
1,511
796
715
73
1
module Probability.Distribution.Markov where import Probability.Random sample_markov x0 next = do x1 <- next x0 xs <- sample_markov x1 next return (x0:xs) sample_markov_n 0 x0 next = return [] sample_markov_n n x0 next = do x1 <- next x0 xs <- sample_markov (n-1) x1 next return (x0:xs) -- I think if ne...
bredelings/BAli-Phy
haskell/Probability/Distribution/Markov.hs
gpl-2.0
817
0
10
160
139
71
68
11
1
-- circulos_en_estrella.hs -- Círculos en estrella. -- José A. Alonso Jiménez <jalonso@us.es> -- Sevilla, 20 de Mayo de 2013 -- --------------------------------------------------------------------- -- --------------------------------------------------------------------- -- Ejercicio. ¿Qué dibujo genera el siguiente pr...
jaalonso/I1M-Cod-Temas
src/Tema_25/circulos_en_estrella.hs
gpl-2.0
680
0
11
117
127
72
55
7
1
{-# OPTIONS_GHC -fglasgow-exts #-} -- test program for C modules -- Wrapper for gcc, use it like gcc and test the C parser -- module Main (main) where import System.Environment (getArgs, getEnv) import System.CPUTime (getCPUTime) import System.Exit import System.Cmd (rawSystem) import System.IO (appendFile, openTemp...
jrockway/c2hs
tests/cparser/CCWrapper.hs
gpl-2.0
3,096
0
28
903
931
476
455
69
3
{-| Module : Sivi.Interface.PrinterThread Description : Thread for doing IO actions Copyright : (c) Maxime ANDRE, 2015 License : GPL-2 Maintainer : iemxblog@gmail.com Stability : experimental Portability : POSIX -} module Sivi.Interface.PrinterThread ( printerThread ) w...
iemxblog/sivi-haskell
src/Sivi/Interface/PrinterThread.hs
gpl-2.0
688
0
9
143
79
44
35
7
1
-- The nth term of the sequence of triangle numbers is given by, tn = ½n(n+1); so the first ten triangle numbers are: -- -- 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ... -- -- By converting each letter in a word to a number corresponding to its alphabetical position and adding these values we form a word value. For exampl...
ciderpunx/project_euler_in_haskell
euler042.hs
gpl-2.0
1,470
0
11
320
234
127
107
24
1
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} module Bachelor.SeqParse where #define EVENTLOG_CONSTANTS_ONLY #include "EventLogFormat.h" import Bachelor.Parsers import Bachelor.Types import Control.Applicative import Control.Monad import Control.Lens import Data.List import Data.Map.Lens import Data.Maybe imp...
brtmr/Eden-Tracelab-cli-tool
src/Bachelor/SeqParse.hs
gpl-3.0
25,957
10
24
8,658
5,907
3,126
2,781
424
11
-- 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
source/Game/LevelPuzzle/File/Version.hs
gpl-3.0
923
0
5
176
66
50
16
8
1
----------------------------------------------------------------------------- -- | -- Module : Hie.Language.Haskell.Exts.Extension -- Copyright : (c) Niklas Broberg 2009 -- License : BSD-style (see the file LICENSE.txt) -- -- Maintainer : Niklas Broberg, d00nibro@chalmers.se -- Stability : tra...
monsanto/hie
Hie/Language/Haskell/Exts/Extension.hs
gpl-3.0
6,714
0
14
1,895
839
533
306
189
12
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} -- | The Functional First Order language. Explicitly typed. -- -- ArrTy in the Type really means defunctionalised Type module Lang.FunctionalFO where import Data.Foldable (Foldable) import Data.Traversable (Traversable) import Lang.Type {-# ANN modu...
danr/tfp1
Lang/FunctionalFO.hs
gpl-3.0
1,881
0
12
487
533
302
231
38
3
{-# LANGUAGE OverloadedStrings #-} {-- KNOWN_ISSUEs 1. address multiple implementations! (resolved in proofObs instead) --} module ToTPTP where import Control.Monad.State import FOOL.AST import qualified FOOL.AST as F import FOOL.TransExpr import FOOL.PrettyAST import FOOL.TPTP import Boogie.TypeChecker import Bo...
emptylambda/BLT
src/ToTPTP.hs
gpl-3.0
29,302
15
30
8,846
10,357
5,162
5,195
639
16
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-games-configuration/gen/Network/Google/Resource/GamesConfiguration/LeaderboardConfigurations/List.hs
mpl-2.0
6,279
0
20
1,447
887
512
375
130
1
module Data.GI.GIR.Arg ( Arg(..) , Direction(..) , Scope(..) , parseArg , parseTransfer ) where import Data.Monoid ((<>)) import Data.Text (Text) import Data.GI.GIR.BasicTypes (Transfer(..), Type) import Data.GI.GIR.Parser import Data.GI.GIR.Type (parseType) data Direction = DirectionIn ...
ford-prefect/haskell-gi
lib/Data/GI/GIR/Arg.hs
lgpl-2.1
2,751
0
11
816
647
356
291
-1
-1
-- Prelude module is implicitly imported -- pi = Prelude.pi func x = x * x * pi
ocozalp/Haskellbook
chapter2/cmp3.hs
unlicense
80
0
6
18
19
10
9
1
1
{-# LANGUAGE OverloadedStrings #-} import Data.Aeson.Types import Data.Conduit import qualified Data.Conduit.List as CL import Data.Conduit.Network import Data.Time.Clock import Data.Time.Format import Network.JsonRpc import System.Locale data TimeReq = TimeReq data TimeRes = TimeRes UTCTime instance FromRequest Time...
anton-dessiatov/json-rpc
examples/time-server.hs
unlicense
1,066
0
12
197
395
203
192
28
1
module WaveMachine.Audio.Volume where import WaveMachine.Audio.Waves applyVolume :: Double -> WaveFunction -> WaveFunction applyVolume volume orig t = orig t * volume
apoco/wave-machine
src/WaveMachine/Audio/Volume.hs
unlicense
169
0
6
23
45
25
20
4
1
module Main where genretateAMonotonicWalls :: [Integer] genretateAMonotonicWalls = filter (\pof2 -> 0 == (pof2 - 1) `mod` 3) $ powerOfTwo 2 -- 2^n generator powerOfTwo :: Integer -> [Integer] powerOfTwo n = n : (powerOfTwo $ n * 2) printList :: (Show a) => [a] -> IO () printList [] = return () printList (x:xs) = (p...
shashikiranrp/Collatz
Main.hs
apache-2.0
411
0
12
76
179
96
83
10
1
{-# LANGUAGE TupleSections #-} import AdventOfCode (readInputFile) import Control.Arrow (second) runDeer :: (Int, Int, Int) -> [Int] runDeer = (0 : ) . runDeerFrom 0 runDeerFrom :: Int -> (Int, Int, Int) -> [Int] runDeerFrom start d@(speed, run, rest) = running ++ resting ++ runDeerFrom end d where running = [sta...
petertseng/adventofcode-hs
bin/14_reindeer_race.hs
apache-2.0
1,238
0
12
283
587
322
265
29
2
import System.IO import Control.Monad import Data.List import Data.Ord main :: IO () main = do hSetBuffering stdout NoBuffering loop loop :: IO () loop = do [sx, sy] <- fmap (map read . words) getLine :: IO [Int] mhs <- replicateM 8 $ fmap read getLine :: IO [Int] let xmax = snd $ maximumBy (compa...
lpenz/codingame-haskell-solutions
puzzles/0-easy/kirks-quest-the-descent/solution.hs
apache-2.0
409
0
14
103
183
91
92
15
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QColorDialog.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:16 Warning : this file is machine generated - do ...
keera-studios/hsQt
Qtc/Gui/QColorDialog.hs
bsd-2-clause
10,788
0
13
1,709
3,443
1,787
1,656
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} ------------------------------------------------------------------------------ module OpenArms.Types.Need ( -- * Types Need (..) , columnOffsetsNeed , tableOfNeed , n...
dmjio/openarms
src/OpenArms/Types/Need.hs
bsd-2-clause
697
0
7
161
71
47
24
19
0
-- Copyright (c) 2014 Eric McCorkle. 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 source code must retain the above copyright -- notice, this list of conditi...
emc2/enumeration
src/Data/Enumeration/Traversal.hs
bsd-3-clause
8,970
1
20
2,457
1,388
798
590
99
2
module Main where import ABS (n_div:x:main_ret:i:f:n:obj:reminder:res:the_end) = [0..] main_ :: Method main_ [] this wb k = Assign n (Val (I 1500)) $ Assign x (Sync primality_test [n]) $ k primality_test :: Method primality_test [pn] this wb k = Assign i (Val (I 1)) $ Assign n (Val (I pn)) $ While (ILT...
abstools/abs-haskell-formal
benchmarks/3_primality_test_parallel/progs/1500.hs
bsd-3-clause
846
0
18
222
506
256
250
30
1
module Main where import Data.Hashable import Data.Word (Word16, Word8) import Data.Bits ((.|.), (.&.), shiftL, shiftR) import Control.Monad (when) import qualified Data.Text as T import qualified Data.Text.IO as TIO import qualified Data.List as L import qualified Data.HashMap.Strict as HM import qualified Control.M...
dan-t/dcpu16
Assembler.hs
bsd-3-clause
5,093
0
21
1,347
1,908
992
916
119
4
----------------------------------------------------------------------------- -- | -- Module : XMonad.Doc.Configuring -- Description : Brief xmonad tutorial. -- Copyright : (C) 2007 Don Stewart and Andrea Rossato -- License : BSD3 -- -- Maintainer : andrea.rossato@unibz.it -- Stability : unstable --...
xmonad/xmonad-contrib
XMonad/Doc/Configuring.hs
bsd-3-clause
5,525
0
3
981
46
43
3
2
0
module Day7 where import Control.Monad.Identity (Identity) import Data.Bits import Data.Function (fix) import Data.Function.Memoize import Data.HashMap.Strict (HashMap) import qualified Data.HashMap.Strict as M import Data.List import qualifie...
z0isch/advent-of-code
src/Day7.hs
bsd-3-clause
3,217
0
16
787
1,326
674
652
79
7
module Folly.FOL where data Term = Fun String [Term] | Var String deriving (Eq,Ord,Show) data EqOp = (:==) | (:!=) deriving (Eq,Ord,Show) data BinOp = (:&) | (:|) | (:=>) | (:<=>) deriving (Eq,Ord,Show) data Formula = EqOp Term EqOp Term | Rel String [Term] | Neg Formula ...
danr/folly
Folly/FOL.hs
bsd-3-clause
1,333
50
8
349
505
330
175
51
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Juno.Types.Message.AER ( AppendEntriesResponse(..), aerTerm, aerNodeId, aerSuccess, aerConvinced , aerIndex, aerHash, aerWasVerified, aerProvenance , AERWire(..) , AlotOfAERs(.....
haroldcarr/juno
src/Juno/Types/Message/AER.hs
bsd-3-clause
3,287
0
16
845
820
457
363
81
0
{-# LANGUAGE OverloadedStrings #-} module Examples.Radio(radio) where import Development.NSIS import Development.NSIS.Plugins.EnvVarUpdate import Development.NSIS.Plugins.Sections radio = do name "Radio" outFile "radio.exe" installDir "$DESKTOP/Radio" requestExecutionLevel User -- page Director...
ndmitchell/nsis
test/Examples/Radio.hs
bsd-3-clause
886
0
11
204
256
118
138
24
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} -- | This module builds Docker (OpenContainer) images. ...
GaloisInc/stack
src/Stack/Image.hs
bsd-3-clause
9,177
0
26
3,118
1,681
865
816
193
2
-- | The Interval module implements diatonic intervals. module Music.Diatonic.Interval ( Interval( Unison,Min2nd,Maj2nd,Min3rd,Maj3rd,Perf4th, Perf5th,Min6th,Maj6th,Min7th,Maj7th ), compound, octave, min9th, maj9th, perf11th, min13th, maj13th, augment, diminish, steps, se...
xpika/music-diatonic
Music/Diatonic/Interval.hs
bsd-3-clause
3,582
0
13
920
1,193
652
541
76
1
module JavaScript.AceAjax.Raw.Ace where import qualified GHCJS.Types as GHCJS import qualified GHCJS.Marshal as GHCJS import qualified Data.Typeable import GHCJS.FFI.TypeScript import GHCJS.DOM.Types (HTMLElement) import JavaScript.AceAjax.Raw.Types foreign import javascript "$1.require($2)" require :: (Ace) -> (GHCJS...
fpco/ghcjs-from-typescript
ghcjs-ace/JavaScript/AceAjax/Raw/Ace.hs
bsd-3-clause
803
10
8
89
206
131
75
12
0
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving, ScopedTypeVariables, FlexibleInstances, DeriveDataTypeable, UndecidableInstances, BangPatterns, OverlappingInstances, DataKinds, GADTs, KindSignatures, NamedFieldPuns #-} -- | Haskell client for Cassandra's CQL protocol -- -- For examples, take...
alphaHeavy/cassandra-cql
Database/Cassandra/CQL.hs
bsd-3-clause
76,172
1
35
23,812
26,886
14,921
11,965
1,403
17
module Main where import Lib import Test.QuickCheck import Test.QuickCheck.Checkers import Test.QuickCheck.Classes main :: IO () main = do putStrLn "Excercises from Chapter 25: Composing Types" putStrLn "Some examples commented out in main function." putStrLn "Use 'stack ghci' to start ghci to play around. Enj...
backofhan/HaskellExercises
CH25/app/Main.hs
bsd-3-clause
506
0
7
85
61
34
27
10
1
{-# LANGUAGE ExistentialQuantification #-} module Main where import Text.ParserCombinators.Parsec hiding (spaces) import System.Environment import Control.Monad import Control.Monad.Error import System.IO import Data.IORef data LispVal = Atom String | List [LispVal] | DottedList [LispVal] ...
alexmacedo/scheme48
src/Main.hs
bsd-3-clause
16,303
0
16
4,347
5,906
2,998
2,908
356
3
module Language.POL.Syntax ( Contract ( Zero, Data , Give , And, Or , If, IfNot , When, Anytime, Until ) , zero, pdata , give , and, or , ifobs, ifnot , when, anytime, until , foldAnd, foldOr , foldLeaves, mapLeaves ) where import Data.POL.Observable ( ObservableT ) import Prel...
ZjMNZHgG5jMXw/privacy-option
Language/POL/Syntax.hs
bsd-3-clause
12,647
0
12
4,603
6,139
3,156
2,983
279
9
-- | DOT AST. See <http://www.graphviz.org/doc/info/lang.html>. module Language.Dot.Syntax where data Graph = Graph GraphStrictness GraphDirectedness (Maybe Id) [Statement] deriving (Eq, Show) data GraphStrictness = StrictGraph | UnstrictGraph deriving (Eq, Show) data GraphDirectedness = DirectedGraph ...
bsl/language-dot
src/Language/Dot/Syntax.hs
bsd-3-clause
1,872
0
8
397
532
303
229
73
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveGeneric #-} module BankObject where import GHC.Generics import Control.Applicative (empty) import Data.Int import Data.Time import Data.Aeson import Data.Aeson.Types() import qualified Data.Text as T import Data.Monoid import Database.PostgreSQL.Simple import Dat...
paradoxix/haskellplayground
src/BankObject.hs
bsd-3-clause
3,776
0
15
984
992
530
462
91
0
module Main where import qualified PPTest.Builders.Dfa import qualified PPTest.Builders.Lalr import qualified PPTest.Builders.Lr1 import qualified PPTest.Builders.Nfa import qualified PPTest.Grammars.Ebnf import qualified PPTest.Grammars.Lexical import qualified PPTest.Grammars.LexicalHelper import qualified PPTest.Le...
chlablak/platinum-parsing
test/Spec.hs
bsd-3-clause
1,062
0
8
143
227
141
86
33
1