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
-- Copyright (C) 2013-2015 Moritz Schulte <mtesseract@silverratio.net> module Main (main) where import qualified Data.Map as M import Data.Maybe import System.Environment -- Commandline Arguments. import Jeopardy.Data import Jeopardy.Utils dumpJDataItem :: JDataTable -> Category -> Integer -> IO () dumpJD...
mtesseract/silverratio-jeopardy
src/jeopardy-dump.hs
gpl-2.0
1,444
0
15
323
443
217
226
34
2
{- | Module : $Header$ Description : String constants for CASL keywords to be used for parsing and printing Copyright : (c) Christian Maeder and Uni Bremen 2002-2003 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable S...
nevrenato/HetsAlloy
Common/Keywords.hs
gpl-2.0
9,412
0
5
1,751
1,828
1,122
706
345
1
{- | Module : ./SoftFOL/Translate.hs Description : utility to create valid identifiers for atp provers Copyright : (c) Klaus Luettich, Uni Bremen 2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : provisional Portability : portable collection ...
spechub/Hets
TPTP/Translate.hs
gpl-2.0
2,264
0
17
504
536
272
264
49
11
{-# LANGUAGE NoImplicitPrelude, RecordWildCards, OverloadedStrings, TemplateHaskell #-} module Graphics.UI.Bottle.Widgets.TextEdit ( Cursor , Style(..) , sCursorColor, sCursorWidth, sBGColor, sEmptyUnfocusedString , sEmptyFocusedString, sTextViewStyle , make , defaultCursorColor , de...
da-x/lamdu
bottlelib/Graphics/UI/Bottle/Widgets/TextEdit.hs
gpl-3.0
13,931
0
16
3,769
4,137
2,213
1,924
-1
-1
{-# LANGUAGE OverloadedStrings #-} -- | A simple fileserver with caching: -- -- - receive and parse the incoming request, -- -- - if the requested file is in the cache, read the cached contents, -- -- - otherwise, read the requested file's contents as a 'ByteString', -- insert it into the cache, and -- -- - send ...
scvalex/dissemina2
Cached.hs
gpl-3.0
1,629
0
20
367
323
175
148
27
2
{-# LANGUAGE DeriveGeneric #-} module System.DevUtils.Sys.Memory ( Memory(..) ) where import GHC.Generics data Memory a = B a | K a | M a | G a | T a | P a | UNKNOWN a deriving (Show, Read, Generic)
adarqui/DevUtils-Sys
src/System/DevUtils/Sys/Memory.hs
gpl-3.0
203
0
6
44
78
48
30
6
0
{-# LANGUAGE UnicodeSyntax #-} module Paths where import Prelude.Unicode import Development.Shake.FilePath -- NB for simplicity we assume the build is always run from the build/ dir. -- This holds true because the build is run by invoking build.sh, which cd -- in the build/ dir before running Shakefile.hs. baseDir ...
c0c0n3/archlinux
vm/src/build/Paths.hs
gpl-3.0
636
0
5
112
80
49
31
12
1
{-# LANGUAGE QuasiQuotes, OverloadedStrings #-} module InterpreterSpec (spec) where import Test.Hspec import Language.Mulang.Interpreter import Language.Mulang.Interpreter.Internals (Reference (..)) import Language.Mulang.Transform.Normalizer import qualified Data.Map.Strict as...
mumuki/mulang
spec/InterpreterSpec.hs
gpl-3.0
7,802
0
22
2,508
1,722
838
884
124
1
module HEP.Automation.MadGraph.Dataset.Set20110710set5 where import HEP.Storage.WebDAV.Type import HEP.Automation.MadGraph.Model import HEP.Automation.MadGraph.Machine import HEP.Automation.MadGraph.UserCut import HEP.Automation.MadGraph.SetupType import HEP.Automation.MadGraph.Model.C8S import HEP.Automation.MadGr...
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110710set5.hs
gpl-3.0
1,623
0
10
563
368
232
136
47
1
module Web ( WebFilePath , webFileRel , webFileAbs , withWebDir , splitWebExtensions , splitWebExtension , replaceWebExtension , makeWebFilePath ) where import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as BSC import Data.Function (on) import Data.Hashable (Hashable(..)) i...
databrary/databrary
src/Web.hs
agpl-3.0
1,814
0
11
313
543
299
244
51
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE PatternSynonyms #-} {-| Module : TypedFlow.Learn Description : Loss functions and optimization strategies Copyright : (c) Jean-Philippe Bernardy, 2017 License : LGPL-3 Maintainer : jean-philippe.bernardy@gu.se Stability : experime...
GU-CLASP/TypedFlow
TypedFlow/Learn.hs
lgpl-3.0
11,520
0
22
2,484
2,893
1,551
1,342
-1
-1
{-# LANGUAGE TypeFamilies #-} module Lupo.Backends.View.Views ( singleDayView , multiDaysView , monthView , searchResultView , loginView , initAccountView , adminView , entryEditorView , entryPreviewView , entriesFeed ) where import qualified Data.List as L import Data.Maybe import Data.Monoid i...
keitax/lupo
src/Lupo/Backends/View/Views.hs
lgpl-3.0
11,425
7
20
2,464
3,623
1,911
1,712
-1
-1
{- Created : 2014 Feb by Harold Carr. Last Modified : 2014 Jun 30 (Mon) 02:45:04 by Harold Carr. -} module Main where import Data.List (foldl') -- profiling with GHC - p. 122 {- cabal clean cabal configure --enable-executable-profiling cabal build dist/build/profiling-example/prof...
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2014-Alejandro_Serrano_Mena-Beginning_Haskell/old/code/src/C05/Main.hs
unlicense
820
0
10
159
78
46
32
6
1
-- file Ch01/WC.hs -- NOTE lines beginning with "--" are comments -- NOTE In GHCI, :set (prompt/ +t) -- NOTE :show bindings, show 'it' bindings main :: IO () main = interact wordCount where wordCount input = show (length (lines input)) ++ "\n" exercise1 :: IO () exercise1 = do let a = succ 7 + pred 7 + round (sq...
Numberartificial/Realworld-Haskell
code/Ch01/WC.hs
apache-2.0
709
0
13
183
262
124
138
24
1
-- | -- Module : Data.Time.Zones.TH -- Copyright : (C) 2014 Mihaly Barasz -- License : Apache-2.0, see LICENSE -- Maintainer : Mihaly Barasz <klao@nilcons.com> -- Stability : experimental -- -- /Example usage:/ -- -- > -- >{-# LANGUAGE TemplateHaskell #-} -- > -- >import Data.Time -- >import Data.Time.Zon...
nilcons/haskell-tz
Data/Time/Zones/TH.hs
apache-2.0
2,754
0
10
462
288
177
111
26
1
-- http://www.codewars.com/kata/5326ef17b7320ee2e00001df module EscapeTheMines where import Data.Maybe import Control.Arrow import Data.List type XY = (Int,Int) data Move = U | D | R | L deriving (Eq, Show) rev :: Move -> Move rev U = D rev D = U rev R = L rev L = R move :: Move -> XY -> XY move U = second pred mov...
Bodigrim/katas
src/haskell/3-Escape-the-Mines-.hs
bsd-2-clause
831
0
16
227
418
218
200
26
1
{-# LANGUAGE GADTs, DataKinds, KindSignatures, TypeOperators, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, PolyKinds, FlexibleContexts, UndecidableInstances, ConstraintKinds, ScopedTypeVariables, TypeInType #-} module Data.Type.Set (Set(..), Union, Unionable, union, qu...
dorchard/type-level-sets
src/Data/Type/Set.hs
bsd-2-clause
9,099
6
15
2,701
4,087
2,171
1,916
172
1
{-# LANGUAGE DeriveDataTypeable, EmptyDataDecls, FlexibleContexts, FlexibleInstances, MultiParamTypeClasses, OverloadedStrings, QuasiQuotes, ScopedTypeVariables, TemplateHaskell, TypeFamilies #-...
wavewave/webcanvas-server
lib/Application/WebCanvas/Server/Yesod.hs
bsd-2-clause
6,367
0
24
1,443
1,691
824
867
143
5
module Main ( main -- :: IO () ) where import Control.Monad (void, when) import Control.Monad.Trans.Resource import Test.Hspec import Test.HUnit import Text.Search.Whistlepig import qualified Text.Search.Whistlepig.Direct as IO main :: IO () main = hspec $ do ----------------------------------------...
thoughtpolice/hs-whistlepig
tests/Properties.hs
bsd-3-clause
1,646
0
20
340
462
226
236
35
1
{-# language Rank2Types #-} {-# language ScopedTypeVariables #-} {-# language DataKinds #-} {-# language TypeOperators #-} {-# language TypeFamilies #-} {-# language FlexibleInstances #-} {-# language FlexibleContexts #-} {-# language MultiParamTypeClasses #-} {-# language PolyKinds #-} {-# language GADTs #-} {-# langu...
markus-git/co-feldspar
src/Feldspar/Software/Verify/Primitive.hs
bsd-3-clause
27,307
0
16
5,734
11,493
5,714
5,779
-1
-1
module Main where import Graphics.UI.Gtk import Graphics.UI.Gtk.Glade import System.Glib.MainLoop import System.IO import System.Process import GHC.Handle import GHC.IOBase import Control.Concurrent.MVar import Control.Concurrent main = do unsafeInitGUIForThreadedRTS dialogXmlM...
ndmitchell/guihaskell
gtkconsole/Main.hs
bsd-3-clause
1,645
0
14
501
421
198
223
44
2
-- | Test the Fibonacci function module FibSpec (main, spec) where -- import Control.Applicative import Control.Exception import System.Timeout import Test.Hspec import Test.QuickCheck -- for Queckcheck example import Fib -- small non-negative integers newtype Small' = Small' Int deriving Show ins...
emaphis/Haskell-Practice
testing-project/test/FibSpec.hs
bsd-3-clause
809
0
19
217
248
130
118
-1
-1
{-# OPTIONS_GHC -fno-warn-tabs #-} {- $Id: TestsReact.hs,v 1.2 2003/11/10 21:28:58 antony Exp $ ****************************************************************************** * Y A M P A * * ...
ivanperez-keera/Yampa
yampa/tests/TestsReact.hs
bsd-3-clause
2,498
3
23
791
632
353
279
44
2
{- Copyright (c) 2008 the authors listed at the following URL, and/or the authors of referenced articles or incorporated external code: http://en.literateprograms.org/Priority_Queue_(Haskell)?action=history&offset=20080608152146 Permission is hereby granted, free of charge, to any person obtaining a copy of this softw...
neothemachine/monadiccp
src/Control/CP/PriorityQueue.hs
bsd-3-clause
3,376
0
9
681
687
353
334
38
1
{-| Description : a minimal PolyPaver problem Copyright : (c) Jan Duracz, Michal Konecny License : BSD3 Maintainer : jan@duracz.net Stability : experimental Portability : portable A few small PolyPaver problems. Example parameters that work: sinsin2: -d 2 -e 3...
michalkonecny/polypaver
examples/haskell/mini.hs
bsd-3-clause
1,948
0
13
665
577
329
248
43
1
module P009 where import Data.Foldable (find) import Data.Maybe (fromJust, mapMaybe) run :: IO () run = print . mult $ triple where triple = fromJust . find (\(a,b,c) -> a+b+c == 1000) $ triples mult (a,b,c) = a*b*c triples :: [(Integer, Integer, Integer)] triples = mapMaybe maybeTriple . filter (uncurry (...
tyehle/euler-haskell
src/P009.hs
bsd-3-clause
796
0
14
190
366
199
167
19
2
{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, StandaloneDeriving, UndecidableInstances #-} module FRP.Sodium.GameEngine2D.Platform where import FRP.Sodium.GameEngine2D.Geometry import Control.Applicative import Data.ByteString.Char8 ...
the-real-blackh/sodium-2d-game-engine
FRP/Sodium/GameEngine2D/Platform.hs
bsd-3-clause
4,447
0
15
1,116
1,389
727
662
93
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE JavaScriptFFI #-} {-| This module provides implementations of cryptographic utilities that only work for GHCJS -} module Dhall.Crypto ( SHA256Digest(..) , sha256DigestFromByteString , sh...
Gabriel439/Haskell-Dhall-Library
dhall/ghcjs-src/Dhall/Crypto.hs
bsd-3-clause
2,674
12
10
524
440
242
198
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} -- | This is a simple text widget that updates its contents by calling -- a callback at a set interval. module System.Taffybar.Widgets.PollingLabel ( pollingLabelNew ) where import Control.Concurrent ( forkIO, threadDelay ) import Control.Exception.Enclosed as E import Control.Mona...
Undeterminant/taffybar
src/System/Taffybar/Widgets/PollingLabel.hs
bsd-3-clause
1,600
0
19
371
250
133
117
22
2
{-# LANGUAGE FlexibleContexts, FlexibleInstances, TypeFamilies #-} module Data.NumKell.Memo ( FMemoIdx(..), fFromList, fMemo ) where import Control.Applicative ((<$>), (<*>)) import Data.Array (Ix, (!), listArray) import Data.HList (HCons(..), HNil(..)) import Data.NumKell.Funk (Funk(..)) data FMemoIdxFuncs i =...
yairchu/numkell
src/Data/NumKell/Memo.hs
bsd-3-clause
2,185
0
15
525
839
461
378
60
1
-- Echo server program module Main where import Control.Monad (unless,when) import Network.Socket hiding (recv) import qualified Data.ByteString as S import Data.Word(Word8) import Control.Concurrent(threadDelay) import Data.List import Numeric import Network.Socket.ByteString (recv, sendAll) main = withSocketsDo $ ...
marcmo/hsDiagnosis
other/echoServer.hs
bsd-3-clause
1,441
0
15
449
429
210
219
37
1
----------------------------------------------------------------------------- -- | -- Module : Plugins.Date -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Andrea Rossato <andrea.rossato@unibz.it> -- Stability : unstable -- Portability : unportable -- -- A d...
neglectedvalue/xmobar-freebsd
Plugins/Date.hs
bsd-3-clause
931
0
8
178
170
95
75
14
1
{-# LANGUAGE FlexibleContexts #-} -- | Alias analysis of a full Futhark program. Takes as input a -- program with an arbitrary lore and produces one with aliases. This -- module does not implement the aliasing logic itself, and derives -- its information from definitions in -- "Futhark.Representation.AST.Attributes.A...
mrakgr/futhark
src/Futhark/Analysis/Alias.hs
bsd-3-clause
2,835
0
12
823
681
359
322
59
1
-- | -- Module: Main -- Copyright: (c) 2013 Ertugrul Soeylemez -- License: BSD3 -- Maintainer: Ertugrul Soeylemez <es@ertes.de> -- -- Benchmark for the instinct package. module Main where import Criterion.Main main :: IO () main = defaultMain []
ertes/instinct
test/Bench.hs
bsd-3-clause
258
0
6
51
36
23
13
4
1
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Hulk.Types (Config (..) ,Nick (..) -- FIXME: ,nickText ,UserName (..) -- FIXME: ,u...
chrisdone/hulk
src/Hulk/Types.hs
bsd-3-clause
6,702
0
11
1,455
1,500
886
614
305
1
{-# LANGUAGE CPP #-} {-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.InstallDirs -- Copyright : Isaac Jones 2003-2004 -- License : BSD...
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/Simple/InstallDirs.hs
bsd-3-clause
22,821
2
16
6,271
4,287
2,397
1,890
370
13
module Geometry.Segment ( Segment , translateSegment , splitSegmentsOnY , splitSegmentsOnX , chooseSplitX , chooseClippingSegment , polarOfRectSeg) where import Geometry.Point import Geometry.Intersection import qualified Data.Vector.Unboxed as V import Data.Vector.Unboxed (Vector) import Data.Maybe import Dat...
mainland/dph
dph-examples/broken/Visibility/Geometry/Segment.hs
bsd-3-clause
3,536
70
13
712
1,118
617
501
65
3
{- | Module : $Header$ Description : Static analysis for the Edinburgh Logical Framework Copyright : (c) Kristina Sojakova, DFKI Bremen 2010 License : GPLv2 or higher, see LICENSE.txt Maintainer : k.sojakova@jacobs-university.de Stability : experimental Portability : portable -} module LF.Analysis...
keithodulaigh/Hets
LF/Analysis.hs
gpl-2.0
7,718
0
18
1,716
2,472
1,256
1,216
162
4
{-# LANGUAGE CPP #-} -- Vectorise a modules type and class declarations. -- -- This produces new type constructors and family instances top be included in the module toplevel -- as well as bindings for worker functions, dfuns, and the like. module Vectorise.Type.Env ( vectTypeEnv, ) where #include "HsVersions.h" ...
snoyberg/ghc
compiler/vectorise/Vectorise/Type/Env.hs
bsd-3-clause
22,685
0
19
6,860
2,674
1,440
1,234
211
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} -- | Docker types. module Stack.Types.Docker where import Control.Applicative import Control.Monad import Control.Monad.Catch (MonadThrow) import Data.Aeson.Extended import Data.Monoi...
phadej/stack
src/Stack/Types/Docker.hs
bsd-3-clause
10,618
0
20
2,276
1,596
900
696
227
1
{-# LANGUAGE OverloadedStrings #-} module Name.Name( Module(), Name, Class, NameType(..), ToName(..), fromName, ffiExportName, getIdent, getModule, isConstructor, isTypeNamespace, isValNamespace, isOpLike, mapName, mapName', nameParts, nameType, pa...
hvr/jhc
src/Name/Name.hs
mit
9,173
0
17
2,373
3,610
1,908
1,702
-1
-1
import System.Environment import System.IO import Text.ParserCombinators.Parsec import Control.Monad import Control.Applicative hiding ((<|>), many) import Data.List import qualified Data.Text as DT (replace) import qualified Text.Regex as RE (mkRegex,subRegex) {-- formhame(Open usp Tukubai) designed by Nobuaki Toun...
h8gi/Open-usp-Tukubai
COMMANDS.HS/formhame.hs
mit
8,567
41
13
2,237
2,874
1,519
1,355
143
12
<?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="fil-PH"> <title>Requester</title> <maps> <homeID>requester</homeID> <mapref location="m...
thc202/zap-extensions
addOns/requester/src/main/javahelp/help_fil_PH/helpset_fil_PH.hs
apache-2.0
961
82
52
155
387
205
182
-1
-1
-- #2409 module ShouldCompile where f :: Int -> Int f _ | () `seq` False = undefined | otherwise = error "XXX" g :: Int -> Int g _ | () `seq` False = undefined | otherwise = error "XXX"
sdiehl/ghc
testsuite/tests/deSugar/should_compile/T2409.hs
bsd-3-clause
203
0
9
58
91
46
45
7
1
{-# LANGUAGE DeriveDataTypeable, GeneralizedNewtypeDeriving #-} module Distribution.Server.Users.UserIdSet ( UserIdSet(..), empty, insert, delete, member, size, toList, fromList, unions, ) where import Distribution.Server.Users.Types import Distribution.Server.Framework.MemSize i...
ocharles/hackage-server
Distribution/Server/Users/UserIdSet.hs
bsd-3-clause
1,782
0
12
285
543
301
242
42
1
{-# LANGUAGE CPP #-} module GHCJS.DOM.MessageEvent ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.MessageEvent #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generat...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/MessageEvent.hs
mit
349
0
5
33
33
26
7
4
0
{-# LANGUAGE OverloadedStrings #-} module Network.Anonymous.Tor.ProtocolSpec where import Control.Concurrent (ThreadId, forkIO, killThread, threadDelay) import Control.Concurrent.MVar import Control.Monad.Catch impo...
solatis/haskell-network-anonymous-tor
test/Network/Anonymous/Tor/ProtocolSpec.hs
mit
4,338
0
23
1,484
1,079
546
533
96
1
module PrettyJSON ( renderJValue ) where import Numeric (showHex) import Data.Char (ord) import Data.Bits (shiftR, (.&.)) import SimpleJSON (JValue(..)) import Prettify (Doc, (<>), char, double, fsep, hcat, punctuate, text, compact) -- , pretty --import Prettify (Doc, (<>), char, double, fsep, hcat, punctuate...
NickAger/LearningHaskell
haskellForMacMiscPlayground/realworldhaskellch04.hsproj/PrettyJSON.hs
mit
2,120
0
12
657
744
385
359
48
2
module NameResolution.Ast where import Parser.Ast import qualified Data.Map as M data Resolved = Local { name :: String } | Global { name :: String } | ReplacementLocal { member :: Bool , name :...
elegios/datalang
src/NameResolution/Ast.hs
mit
631
0
11
255
155
91
64
17
0
{-| Module : Test.Make.Instances.Common Description : Tests the Common instances for Make Copyright : (c) Andrew Burnett 2014-2015 Maintainer : andyburnett88@gmail.com Stability : experimental Portability : Unknown Contains the test hierarchy for the Make Common modules -} module Test.Make.Instances.Common ...
aburnett88/HSat
tests-src/Test/Make/Instances/Common.hs
mit
702
0
7
120
92
64
28
14
1
import Control.Monad (guard) data Response a = Error String | Ok a deriving (Show, Eq) squareRoot x = if x < 0 then Error "negative" else Ok (sqrt x) main = do guard $ squareRoot 9 == Ok 3 guard $ squareRoot 100.0 == Ok 10.0 guard $ squareRoot (-4) == Error "negative"
rtoal/ple
haskell/response.hs
mit
301
1
11
85
134
64
70
11
2
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} module Data.Matrix.Hermitian.Dense (DenseHMatrix(..) ,fullEigensystem) where import Data.Matrix import Data.Matrix.Dense import...
lensky/hs-matrix
lib/Data/Matrix/Hermitian/Dense.hs
mit
5,483
0
19
1,729
1,836
982
854
119
2
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE TypeApplications #-} module SolverSpec where import Control.Monad import Data.Int import Math.NumberTheory.Primes import Solver import Test.Hspec import Test.Hspec.QuickCheck import Test.QuickCheck import Data.Either smallPrimes ::...
Javran/misc
gaussian-elim/test/SolverSpec.hs
mit
3,619
0
27
1,395
1,050
531
519
-1
-1
{-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} module Unison.Test.UnisonSources where import Control.Exception (throwIO) import Control.Lens ( view ) import Control.Lens.Tuple ( _5 ) import Control.Monad (void) import Control....
unisonweb/platform
parser-typechecker/tests/Unison/Test/UnisonSources.hs
mit
7,971
0
21
2,055
2,366
1,240
1,126
166
3
{-# LANGUAGE OverloadedStrings #-} import System.Authinfo main = getPassword "gmail.com" "ablabla" >>= print
robgssp/authinfo-hs
Test.hs
mit
110
0
6
14
21
11
10
3
1
module Main where import Data.List import System.Environment import System.Random import qualified Data.Set as S import qualified ACME.Yes.PreCure5 as Yes import ACME.Yes.PreCure5.Class (allPrecures) import qualified ACME.Yes.PreCure5.Random as R import qualified ACME.Yes.PreCure5.GoGo as GoGo main :: IO () main = d...
igrep/yes-precure5-command
main.hs
mit
1,055
0
10
171
319
174
145
26
1
module Environment ( Environment, nullEnv, setVar, getVar, defineVar, bindVars, ) where import IError import Control.Monad import Control.Monad.Error import Data.IORef import System.IO type Environment a = IORef [(String, IORef a)] nullEnv :: IO (Environment a) nullEnv = newIORef [] -- Check if a variable ha...
mhrheaume/hskme
Environment.hs
gpl-2.0
1,686
30
14
336
639
323
316
49
2
{- This module was generated from data in the Kate syntax highlighting file monobasic.xml, version 1.01, by Davide Bettio (davide.bettio@kdemail.net) -} module Text.Highlighting.Kate.Syntax.Monobasic (highlight, parseExpression, syntaxName, syntaxExtensions) where import Text.Highlighting.Kate.Types impor...
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Monobasic.hs
gpl-2.0
10,683
0
54
1,405
2,242
1,163
1,079
190
6
-- Sample code to demonstrate how to emulate X86 code import Unicorn import Unicorn.Hook import qualified Unicorn.CPU.X86 as X86 import Control.Monad.Trans.Class (lift) import qualified Data.ByteString as BS import Data.Word import qualified Numeric as N (showHex) import System.Environment -- Code to be emulated -- ...
petmac/unicorn
bindings/haskell/samples/SampleX86.hs
gpl-2.0
23,004
0
17
7,281
5,369
2,580
2,789
414
5
{-# LANGUAGE OverloadedStrings #-} module InnerEar.Widgets.ScoreGraphs where import Reflex import Reflex.Dom import Data.Map import Control.Monad import qualified Data.Text as T import Data.Monoid((<>)) import Data.Maybe (fromJust) import InnerEar.Types.Frequency import InnerEar.Widgets.Utility i...
luisnavarrodelangel/InnerEar
src/InnerEar/Widgets/ScoreGraphs.hs
gpl-3.0
1,725
0
10
282
472
256
216
42
1
{-# LANGUAGE DeriveDataTypeable, TemplateHaskell #-} module BinLists where import Prelude hiding ((+), (*), (++), (&&),(||),not) import HipSpec import Control.Applicative data Bin = One | ZeroAnd Bin | OneAnd Bin deriving (Show, Eq, Ord, Typeable) data Nat = Z | S Nat deriving (Show,Eq,Ord,Typeable) instance Name...
danr/hipspec
examples/BinLists.hs
gpl-3.0
2,297
2
17
602
938
488
450
52
1
-- -- Epanet.hs: EPANET Toolkit module in Haskell -- -- Author: -- Steffen Macke (sdteffen@sdteffen.de) -- -- Copyright (C) 2013 Steffen Macke (http://epanet.de) -- -- 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 Fr...
sdteffen/epanet-haskell
Epanet.hs
gpl-3.0
23,325
0
32
5,127
6,679
3,448
3,231
641
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module BTFO where import qualified Data.Text as T import Data.Text (Text) import qualified Database as DB import Web.Telegram.API.Bot hiding (from) import Data.Maybe countBTFO :: Text -> Message -> IO () countBTFO txt Message{..} = case entiti...
fgaray/telegram-bot
src/BTFO.hs
gpl-3.0
1,337
0
18
354
479
248
231
30
5
{- emacs2nix - Generate Nix expressions for Emacs packages Copyright (C) 2016 Thomas Tuegel 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, or (at your option) any l...
ttuegel/emacs2nix
src/Distribution/Nix/Package/Melpa.hs
gpl-3.0
3,081
0
15
882
611
348
263
73
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-blogger/gen/Network/Google/Resource/Blogger/Posts/Delete.hs
mpl-2.0
4,483
0
18
1,125
779
452
327
109
1
{-# LANGUAGE DeriveDataTypeable, OverloadedStrings #-} module NicovideoTranslator.Main (main) where import Data.Char (toLower) import System.IO (stderr, stdout) import System.IO.Error (catchIOError) import Data.Data (Data) import qualified Data.LanguageCodes as L import qualified Data.Text as T import Data.Text.Encod...
dahlia/nicovideo-translator
lib/NicovideoTranslator/Main.hs
agpl-3.0
4,714
0
20
1,975
998
538
460
94
2
import Debug.Trace import Euler import Data.Map (Map) import qualified Data.Map as Map import Data.Maybe import Data.List candidates = map (+(-1)) primes filter357 n = let d = divisors n ds = map (\m -> m + (n `div` m)) d in all isPrime ds prob357 = sum $ takeWhile (<10^8) $ filter filter357 candidates m...
jdavidberger/project-euler
prob357.hs
lgpl-3.0
340
0
14
73
151
83
68
13
1
{-# LANGUAGE RecordWildCards #-} module Forces ( forces ) where import Control.Concurrent import Linear.Affine import RigidBody.Physics hiding (forces) import qualified RigidBody.Physics as Physics import qualified Types update :: Types.Input -> Types.State -> Types.State update i s = Types.State { part...
mbernat/sdl
main/Forces.hs
unlicense
1,074
0
13
247
369
198
171
29
1
{- Created : 2013 Oct 29 (Tue) 18:57:36 by carr. Last Modified : 2014 Mar 06 (Thu) 13:46:19 by Harold Carr. -} module FP07GameDef where data Game = Game { terrain :: Pos -> Bool , startPos :: Pos , goal :: Pos } data Pos = Pos { x :: Int, y :: Int } deriv...
haroldcarr/learn-haskell-coq-ml-etc
haskell/course/2013-11-coursera-fp-odersky-but-in-haskell/FP07GameDef.hs
unlicense
1,858
0
12
568
844
452
392
32
1
-- Copyright 2017 Ondrej Sykora -- -- 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 ...
ondrasej/heavenly-bodies
src/HBodies/Game/State.hs
apache-2.0
13,059
0
13
2,953
1,877
1,070
807
187
1
module Game where import Cards import Player data Game = Game { topCard :: Card , players :: [Player] , stack :: Deck , ntake :: Int , nskip :: Bool } deriving (Show) data Move = Play Card | Draw | Pass der...
Kingdread/Huno
src/Game.hs
bsd-2-clause
952
0
12
412
223
125
98
19
4
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Controller ( withBioSpace , withDevelApp ) where import BioSpace import Settings import Yesod.Helpers.Static import Yesod.Auth import Yesod.Auth.HashDB(mig...
chetant/bioSpace
Controller.hs
bsd-2-clause
1,767
0
12
271
309
172
137
34
1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Command.Export.Perform ( ExportOptions , options , perform ) where import Data.Monoid import Options.Applicative import System.Exit import Text.Comma import qualified Data.Text as T import qualified Data.Text.IO as T import qualified System.FilePat...
lovasko/swim
src/Command/Export/Perform.hs
bsd-2-clause
2,035
0
12
453
444
247
197
49
2
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} {-| Module : $Header$ Copyright : (c) 2015 Deakin Software and Technology Innovation Lab L...
dstil/aegle
aegle-impl/app/Main.hs
bsd-3-clause
17,928
0
22
4,981
5,637
2,961
2,676
-1
-1
module MB.Gen.Base ( buildPage ) where import MB.Types import MB.Templates buildPage :: Blog -> String -> Maybe String -> Template -> String buildPage blog content extraTitle tmpl = let attrs = [ ("content", content) ] ++ maybe [] (\t -> [("extraTitle", t)]) extraTitle in fillTemplate ...
jtdaugherty/mathblog
src/MB/Gen/Base.hs
bsd-3-clause
336
0
14
82
117
64
53
9
1
module Main where main = putStrLn "cool"
tolysz/ssh-proxy
Main.hs
bsd-3-clause
41
0
5
7
12
7
5
2
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} module Common.MonadRef ( MonadRef (..) ) where import Control.Monad.ST (ST) import Control.Monad (void) import Data.IORef (IORef, newIORef, readIORef, writeIORef, modifyIORef, modifyIORef') import Data.STRef (STRef, newSTRef, readSTRef, writeSTRef, modi...
foreverbell/project-euler-solutions
lib/Common/MonadRef.hs
bsd-3-clause
1,099
0
10
242
397
216
181
31
0
-- 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. An additional grant -- of patent rights can be found in the PATENTS file in the same directory. module Duckling.D...
rfranek/duckling
tests/Duckling/Dimensions/Tests.hs
bsd-3-clause
1,319
0
7
193
214
150
64
31
1
-- (c) The University of Glasgow 2006 -- (c) The GRASP/AQUA Project, Glasgow University, 1998 -- -- Type - public interface {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-orphans #-} -- | Main functions for manipulating types and type-related things module Type ( -- Note some of this is just re-exports from T...
mcschroeder/ghc
compiler/types/Type.hs
bsd-3-clause
92,564
0
18
25,578
19,374
10,108
9,266
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DeriveDataTypeable #-} module Data.IHO.S57.DSPM where import Control.Lens import Data.Text (Text) import Data.Data (Data) import Data.Typeable (Typeable) import Data.Tree import Data.IHO.S57.Types data CoordinateUnits = LatitudeLongi...
alios/iho-s57
library/Data/IHO/S57/DSPM.hs
bsd-3-clause
2,384
20
13
603
561
305
256
82
0
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} module Main where import Control.Applicative (optional, (<|>)) import Control.Exception (SomeException, throwIO) import Data.Text ...
Gabriel439/Haskell-Dhall-Library
dhall-json/json-to-dhall/Main.hs
bsd-3-clause
5,546
0
20
1,898
1,136
584
552
137
7
module Codex.Lib.Compression ( Compression (..), compress, compressFile, decompress, decompressFile ) where class Compression a where compress :: a -> Either String a compressFile :: String -> IO (Either String a) decompress :: a -> Either String a decompressFile :: String -> IO (Either String a)
adarqui/Codex
src/Codex/Lib/Compression.hs
bsd-3-clause
309
0
10
56
105
57
48
11
0
module TaglessFinal.Deep where import TaglessFinal.Syntax import TaglessFinal.Term import Text.Printf ( printf ) import Control.Monad.State import TaglessFinal.VarState import qualified Syntax newtype Deep a = Deep { unDeep :: State VarState (Either (Syntax.Tx) (Syntax.G Syntax.X)) } fromLeft :: Either a b -> a fr...
kajigor/uKanren_transformations
src/TaglessFinal/Deep.hs
bsd-3-clause
1,423
0
17
375
663
321
342
45
1
----------------------------------------------------------------------------- -- | -- Module : Data.Promotion.Prelude -- Copyright : (C) 2014 Jan Stolarek -- License : BSD-style (see LICENSE) -- Maintainer : Jan Stolarek (jan.stolarek@p.lodz.pl) -- Stability : experimental -- Portability : non-porta...
int-index/singletons
src/Data/Promotion/Prelude.hs
bsd-3-clause
5,200
0
5
789
1,166
814
352
103
0
{-# LANGUAGE TemplateHaskell #-} module Types ( St(..) , UIMode(..) , AppEvent(..) , uiMode, backend, store, config , availableMigrations, installedMigrations , migrationList, editMigrationName, editMigrationDeps , initialState, editingMigration, status, statusChan ) where import Control.Lens import Co...
jtdaugherty/dbmigrations-client
src/Types.hs
bsd-3-clause
2,050
0
10
473
478
292
186
53
1
import Control.Concurrent (threadDelay, forkIO) import Control.Monad (forever) {- main :: IO () main = do forkIO $ forever $ do threadDelay 1000000 putStrLn "chatter program" getLine return () -} main :: IO ()
wavewave/chatter
src/test.hs
bsd-3-clause
230
0
6
53
35
20
15
3
0
module Wham.Translator(translate, annotate) where import Wham.AST import Wham.ControlPoint import Wham.AMDefinitions hiding ((+)) addCP :: Statement -> ControlPoint -> (ControlPoint, StatementCP) addCP (Skip) cp = (cp + 1, SkipCP cp) addCP (Assign x a) cp = (cp + 1, AssignCP x a cp) addCP (Compound s1 s2) cp = (cp2, ...
helino/wham
src/Wham/Translator.hs
bsd-3-clause
3,659
0
10
1,362
1,267
656
611
67
1
module Main where import Test.DocTest main :: IO () main = doctest [ "-XOverloadedStrings" , "Network/HTTP/QueryString/Internal.hs" ]
worksap-ate/http-querystring
test/Doctest.hs
bsd-3-clause
148
0
6
31
33
19
14
6
1
{-# LANGUAGE RankNTypes, NamedFieldPuns, RecordWildCards, RecursiveDo, BangPatterns, OverloadedStrings, TemplateHaskell, FlexibleContexts #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Distribution.Server.Features.Users ( initUserFeature, UserFeature(..), UserResource(..), GroupResource(...
agrafix/hackage-server
Distribution/Server/Features/Users.hs
bsd-3-clause
39,376
28
27
11,548
7,561
3,960
3,601
592
24
module BrowseSpec where import Control.Applicative import Test.Hspec import Browse import Expectation import Types spec :: Spec spec = do describe "browseModule" $ do it "lists up symbols in the module" $ do syms <- lines <$> browseModule defaultOptions "Data.Map" syms `shouldConta...
eagletmt/ghc-mod
test/BrowseSpec.hs
bsd-3-clause
847
0
17
229
174
87
87
19
1
{-# LANGUAGE OverloadedStrings, ExtendedDefaultRules #-} module Main where import Web.Scotty as S import Control.Monad.IO.Class import Control.Monad.Reader import Data.Monoid import TimeEdit import Data.Text.Lazy (Text) import qualified Data.Text.Lazy as T import Text.Blaze.Html5 as H hiding (main) import Text.Blaze.H...
pnutus/slask
app/Main.hs
bsd-3-clause
2,877
0
20
634
870
450
420
83
3
module Llvm.Hir.Data (module Llvm.Hir.Data.Module ,module Llvm.Hir.Data.Type ,module Llvm.Hir.Data.Inst ,module Llvm.Hir.Data.Commentor ,module Llvm.Hir.Data ) where import Llvm.Hir.Data.Module import Llvm.Hir.Data...
mlite/hLLVM
src/Llvm/Hir/Data.hs
bsd-3-clause
1,199
0
8
380
110
76
34
11
0
{-# OPTIONS_GHC -fno-warn-unused-imports #-} module Halytics.Tutorial where import Control.Lens import Halytics.Monitor import Halytics.Metric import Halytics.Metric.Statistics {-$ First, some extensions: >>> :set -XDataKinds == The basics The most important type in Halytics is a 'Monitor'. It stores the values...
nmattia/halytics
src/Halytics/Tutorial.hs
bsd-3-clause
4,711
0
4
848
29
19
10
6
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | See "Control.Monad.Trans.Except". module Control.Monad.Trans.Ether.Ex...
bitemyapp/ether
src/Control/Monad/Trans/Ether/Except.hs
bsd-3-clause
5,742
0
11
1,060
1,645
902
743
104
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE ExistentialQuantification #-} module Language.LSP.Types.Cancellation where import Data.Aeson.TH import Langua...
alanz/haskell-lsp
lsp-types/src/Language/LSP/Types/Cancellation.hs
mit
773
0
10
178
172
96
76
22
0
{-# LANGUAGE CPP #-} {-# LANGUAGE TemplateHaskell #-} module DTypes.Internal.TH.Helpers ( destructure , appEs , apAppEs , liftAppEs , nameFromTyVarBndr , conAppsT ) where #if !MIN_VERSION_base(4,8,0) import Control.Applicative (Applicative (..), (<$>)) #endif import Language.Haskell.TH -- | Generates ...
timjb/frecords
src/DTypes/Internal/TH/Helpers.hs
mit
1,180
0
9
244
314
181
133
29
2
module Main where import Genes; import Util; import Debug.Trace; fit::Fitness fit chr = sum $ map fromIntegral chr fitGenerator::Double->(Double->Double)->Double->Fitness fitGenerator num f target = (\chromosome -> let x = binToDouble num chromosome delta = target - f x :: Double in 1.0 / delta ** 2...
Teaspot-Studio/bmstu-binary-genetics
src/Main.hs
mit
957
0
12
277
333
177
156
28
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Network.AWS.EFS.Types.Sum -- Copyrigh...
fmapfmapfmap/amazonka
amazonka-efs/gen/Network/AWS/EFS/Types/Sum.hs
mpl-2.0
1,549
0
12
344
236
128
108
33
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-ml/gen/Network/AWS/MachineLearning/DeleteDataSource.hs
mpl-2.0
4,056
0
9
809
464
284
180
56
1
{-# LANGUAGE TemplateHaskell, TupleSections, MultiParamTypeClasses #-} {-| This module contains the Template Haskell routines used to generate indexed set structures and their associated query types. -} module Language.K3.Utils.IndexedSet.TemplateHaskell ( QueryDescriptor(..) , createIndexedSet ) where import Con...
DaMSL/K3
src/Language/K3/Utils/IndexedSet/TemplateHaskell.hs
apache-2.0
7,671
8
27
2,491
1,614
827
787
133
1