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
import Data.Bool fun1 :: [Integer] -> Integer fun1 [] = 1 fun1 (x:xs) | even x = (x - 2) * fun1 xs | otherwise = fun1 xs fun1' :: [Integer] -> Integer fun1' l = product . map (\x -> x-2) . filter even $ l -------------------------------------------------------------------- fun2 :: Integer -> ...
flocknroll/haskell_cis194
H4/h4.hs
mit
2,555
0
15
779
1,090
563
527
51
3
module Zwerg.Prelude ( show , module EXPORTED ) where import Prelude as EXPORTED hiding (id, (.), show, Monoid(..)) import qualified Prelude as P (show) import Zwerg.Data.UUID as EXPORTED import Zwerg.Data.ZColor as EXPORTED import Zwerg.Prelude.Class as EXPORTED import Zwerg.Prelude.Primitives as EXPORTED imp...
zmeadows/zwerg
lib/Zwerg/Prelude.hs
mit
1,318
0
8
184
361
245
116
-1
-1
{-# htermination (>) :: () -> () -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_GT_2.hs
mit
45
0
2
10
3
2
1
1
0
----------------------------------------------------------------------------- -- | -- Module : InsertPlaces -- Copyright : (c) Artem Chirkin -- License : MIT -- -- Maintainer : Artem Chirkin <chirkin@arch.ethz.ch> -- Stability : experimental -- -- Import places from a tab-separated text file provided...
achirkin/mooc-images
locations/InsertPlaces.hs
mit
5,041
0
15
1,200
684
383
301
52
3
-- | -- Module: BigE.TextRenderer.Text -- Copyright: (c) 2017 Patrik Sandahl -- Licence: MIT -- Maintainer: Patrik Sandahl <patrik.sandahl@gmail.com> -- Stability: experimental -- Portability: portable module BigE.TextRenderer.Text ( Text (..) , init , update , enable , disable , delete , re...
psandahl/big-engine
src/BigE/TextRenderer/Text.hs
mit
6,019
0
21
1,991
1,413
773
640
108
2
{-# LANGUAGE OverloadedStrings #-} import qualified Data.Text as T import qualified Blaze.ByteString.Builder as Blaze import Control.Exception (finally) import Data.Array.IO import qualified Data.ByteString.UTF8 as BU import Data.Heap (singleton, MinPrioHeap, view, insert) import qualified Control.Conc...
pkinsky/qs-ws
ws.hs
mit
3,546
0
18
1,126
1,244
630
614
79
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE DeriveGeneric #-} module Codec.Xlsx.Types.Internal.SharedStringTable ( -- * Main types SharedStringTable(..) , sstConstruct , sstLookupText , sstLookupRich , sstItem , sstEmpty ) where import Control.Monad import qua...
qrilka/xlsx
src/Codec/Xlsx/Types/Internal/SharedStringTable.hs
mit
4,305
0
15
719
743
420
323
65
3
-- | The Dreaded Monomorphism Restriction. module DMR where import Data.List plus = (+) -- If you don't use plus in functions @myInt@ and @myDouble@ below, the type -- will default to: -- -- > Integer -> Integer -> Integer -- -- Instead of what we would expect: -- -- > Num a => a -> a -> a myInt :: Doubl...
capitanbatata/functional-systems-in-haskell
fsh-exercises/src/DMR.hs
mit
2,492
0
8
571
362
222
140
24
1
{-# LANGUAGE FlexibleContexts, FlexibleInstances, UndecidableInstances #-} -- Pure Haskell implementation of standard BFGS algorithm with cubic -- line search, with the BFGS step exposed to provide access to -- intermediate Hessian estimates. -- Author: Ian Ross, for OpenBrain Ltd module Caret.BFGS ( BFGSOpts...
BeautifulDestinations/caret
lib/Caret/BFGS.hs
mit
10,548
0
23
3,147
3,256
1,769
1,487
171
10
module Math ( fromDegrees, toDegrees ) where fromDegrees :: Double -> Double fromDegrees angle = angle * pi / 180 toDegrees :: Double -> Double toDegrees angle = angle * 180 / pi
bitc/crap-chopper-game
Math.hs
mit
182
0
6
36
62
34
28
8
1
-- Problems/Problem042Spec.hs module Problems.Problem042Spec (main, spec) where import Test.Hspec import Problems.Problem042 main :: IO() main = hspec spec spec :: Spec spec = describe "Problem 42" $ it "Should evaluate to 162" $ p42 `shouldBe` 162
Sgoettschkes/learning
haskell/ProjectEuler/tests/Problems/Problem042Spec.hs
mit
264
0
8
51
73
41
32
9
1
{-# LANGUAGE OverloadedStrings #-} {- This file is part of the Haskell package thetvdb. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at git://pmade.com/thetvdb/LICENSE. No part of themoviedb package, including this file, may be copied, modified, prop...
pjones/thetvdb
Network/API/TheTVDB/Fetch.hs
mit
3,450
0
11
951
941
531
410
61
2
module Prolog.Parser where import Prelude hiding (exp) import Text.Megaparsec import Text.Megaparsec.String import qualified Text.Megaparsec.Lexer as L type Prolog = [Clause] data Clause = Clause Pexp Pexps deriving (Show, Eq) type Pexps = [Pexp] data Pexp = PExp Exp | PIs Exp Exp | PL...
sdemos/prolog
src/Prolog/Parser.hs
mit
3,049
0
13
966
1,110
556
554
122
1
module Writer (writer, toTex, toPdf) where import Paths_ppp (version) import Emb (emb) import qualified Data.ByteString.Lazy.Char8 as BS import Data.Text (Text) import Data.Version (showVersion) import Skylighting.Styles (tango) import System.Exit (exitFailure) import System.IO (stderr) import Text.Pandoc.Class (runI...
Thhethssmuz/ppp
src/Writer.hs
mit
1,537
0
13
322
483
269
214
38
2
module CheckPalindrome where isPalindrome :: (Eq a) => [a] -> Bool isPalindrome x = x == y where y = reverse x
rasheedja/HaskellFromFirstPrinciples
Chapter4/checkPalindrome.hs
mit
112
0
7
23
47
26
21
3
1
module Parser(parseExpr, parseMain, parseSequenceNoBrackets, parseWhile, parseListGen, parseUserFunc, parseFunc) where import Text.ParserCombinators.Parsec hiding (spaces) import qualified Text.ParserCombinators.Parsec as P(spaces) import Types spaces :: Parser () spaces = skipMany1 (oneOf " ,") symbol = oneOf "!@#$...
stefan-j/slang
parser.hs
gpl-2.0
5,395
51
14
1,095
1,903
915
988
188
4
module Grid where import Control.Monad -- Interval has two bounds -- data Interval a = Interval { min :: a, max :: a } type Interval a = (a, a) -- Interval for each dimension, creates a n-dimensional cube. type Domain a = [Interval a] -- A cutter cuts an interval in many type Cutter a = Interval a -> [Interval a] ...
Vetii/Komposition
Grid.hs
gpl-2.0
605
0
7
133
130
76
54
9
1
{- | Module : $Header$ Description : qualify all names in the nodes of development graphs Copyright : (c) Igor Stassiy, C.Maeder DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(Logic) qualify and d...
nevrenato/Hets_Fork
Proofs/QualifyNames.hs
gpl-2.0
6,396
0
22
1,698
1,997
1,016
981
130
6
{- emacs2nix - Generate Nix expressions for Emacs packages Copyright (C) 2018 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 la...
ttuegel/emacs2nix
src/Distribution/Bzr.hs
gpl-3.0
1,436
0
16
255
205
113
92
16
1
module OhBool.Reducer where import OhBool.Common import OhBool.Evaluation import OhBool.Utils import qualified Data.Map as M reduce :: Expression -> Expression reduce ex = ex where table = constructTruthTable ex eval = M.toAscList $ evaluation table grayEval = grayify eval trues = filter sn...
RomainGehrig/OhBool
src/OhBool/Reducer.hs
gpl-3.0
332
0
8
73
88
49
39
11
1
-- | -- Copyright: (C) 2015 Siddhanathan Shanmugam -- License: GPL (see LICENSE) -- Maintainer: siddhanathan@gmail.com -- Portability: very -- -- Concise Brainfuck Interpreter using ListZippers -- module Main where import Control.Applicative ((<$>)) import Data.Char (ord, chr) import Data.List.Zipper (Zipper, fromLis...
siddhanathan/brainfuck
src/Main.hs
gpl-3.0
1,859
0
13
619
875
441
434
31
8
import Parser import Stundenplan import GHC.Exts (sortWith) main = do seminar <- leseSeminar "jena/" print seminar
turion/hasched
TestParser.hs
gpl-3.0
125
0
8
26
38
19
19
6
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE DeriveDataTypeable, BangPatterns #-} {-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSem -- Copyright : (c) The University of Glasgow 2001 -- License : BS...
jwiegley/ghc-release
libraries/base/Control/Concurrent/QSem.hs
gpl-3.0
4,346
0
19
1,156
810
448
362
60
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Organizations/Exclusions/Patch.hs
mpl-2.0
6,362
0
17
1,355
868
509
359
124
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.Datastore -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Pu...
rueshyna/gogol
gogol-datastore/gen/Network/Google/Datastore.hs
mpl-2.0
7,023
0
9
1,879
810
579
231
207
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-partners/gen/Network/Google/Resource/Partners/ClientMessages/Log.hs
mpl-2.0
5,480
0
18
1,354
860
500
360
121
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/UpdatePipelineStatus.hs
mpl-2.0
4,585
0
9
980
523
320
203
64
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Backups/SetIAMPolicy.hs
mpl-2.0
6,484
0
16
1,329
791
466
325
122
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-glacier/gen/Network/AWS/Glacier/GetVaultNotifications.hs
mpl-2.0
5,769
0
9
1,067
528
326
202
67
1
{- Copyright (C) 2009 Andrejs Sisojevs <andrejs.sisojevs@nextmail.ru> All rights reserved. For license and copyright information, see the file COPYRIGHT -} -------------------------------------------------------------------------- -------------------------------------------------------------------------- {-# OPTION...
Andrey-Sisoyev/haskell-PCLT
Text/PCLT/Template__.hs
lgpl-2.1
10,969
0
15
2,278
1,922
1,057
865
92
0
-- Basic Input and Output main2 = do putStrLn "wangyixiang" place <- getLine let year = (length place) * 10 putStrLn $ "It's " ++ place ++ " distance is " ++ show year
wangyixiang/beginninghaskell
chapter9/src/Chapter9/wangyixiang.hs
unlicense
186
0
12
52
61
28
33
5
1
{-# LANGUAGE OverloadedStrings, GeneralizedNewtypeDeriving #-} module Database where import Data.Aeson ((.:), (.:?), decode, FromJSON(..), Value(..), ToJSON(..), (.=), object) import Control.Applicative import qualified Data.Map as M import qualified Data.ByteString.Lazy.Char8 as B import Types addTodoItem :: Strin...
karun012/scotty-todo-sample
src/Database.hs
unlicense
1,436
0
22
544
425
229
196
25
2
-- Define all quicktests that are used to test the additive properties of expresssions module QuickTests.Addition (tests) where import Test.QuickCheck (quickCheck, counterexample) import CAS import QuickTests.Arbitrary (arbitrary) -- If one wants a look at the generated expressions in any quickCheck simply re...
abid-mujtaba/haskell-cas
test/QuickTests/Addition.hs
apache-2.0
1,878
0
8
402
381
201
180
25
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="id-ID"> <title>Context Alert Filters | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/alertFilters/resources/help_id_ID/helpset_id_ID.hs
apache-2.0
983
80
66
161
417
211
206
-1
-1
{- | Module : Camfort.Specification.Units.Analysis.Criticals Description : Critical-units analysis. Copyright : (c) 2017, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish License : Apache-2.0 Maintainer : dom.orchard@gmail.com Stability : experimental This module defines an analysi...
dorchard/camfort
src/Camfort/Specification/Units/Analysis/Criticals.hs
apache-2.0
5,103
0
22
1,333
980
558
422
71
1
module Analysis.Types.AnnotationTests where import Analysis.Types.Annotation import qualified Analysis.Types.Sorts as S import qualified Analysis.Types.Common as C import qualified Analysis.Types.CommonTests as CT import Test.QuickCheck.Gen import Test.QuickCheck import Control.Applicative import qualified Data.Map as...
netogallo/polyvariant
test/Analysis/Types/AnnotationTests.hs
bsd-3-clause
4,239
0
20
1,348
1,533
764
769
93
9
{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE OverloadedStrings #-} module Text.Scalar.Types ( URI , VersionURI , mkVersionURI , unVersionURI , PathID , mkPathID , unP...
corajr/scalar-convert
src/Text/Scalar/Types.hs
bsd-3-clause
2,568
0
9
943
580
349
231
72
1
module Text.Highlighter.Lexers.Felix (lexer) where import Text.Regex.PCRE.Light import Text.Highlighter.Types lexer :: Lexer lexer = Lexer { lName = "Felix" , lAliases = ["felix", "flx"] , lExtensions = [".flx", ".flxh"] , lMimetypes = ["text/x-felix"] , lStart = root' , lFlags = [multiline] ...
chemist/highlighter
src/Text/Highlighter/Lexers/Felix.hs
bsd-3-clause
8,770
0
12
1,335
2,178
1,099
1,079
139
1
module Aws.S3.Commands.Multipart where import Aws.Aws import Aws.Core import Aws.S3.Core import Control.Applicative import Control.Arrow (second) import Control.Monad.Trans.Resource import Crypto.Hash import qualified Crypto.Hash.MD5 ...
fpco/aws
Aws/S3/Commands/Multipart.hs
bsd-3-clause
15,895
1
21
4,753
3,541
1,911
1,630
-1
-1
module Hrpg.Framework.Chance ( PercentChance (..) , roll ) where import Control.Monad.Random newtype PercentChance = PercentChance Int deriving Show instance Num PercentChance where PercentChance x + PercentChance y = PercentChance (x + y) PercentChance x - PercentChance y = PercentChance (x -...
cwmunn/hrpg
src/Hrpg/Framework/Chance.hs
bsd-3-clause
709
0
9
176
250
124
126
16
1
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-} {-# OPTIONS_GHC -fcontext-stack41 #-} module Games.Chaos2010.Database.Creating_new_game_table where import Games.Chaos2010.Database.Fields import Database.HaskellDB.DBLayout type Creating_new_game_table = Record (HCons (LVPair Creating_new_game (Expr Bool)) ...
JakeWheat/Chaos-2010
Games/Chaos2010/Database/Creating_new_game_table.hs
bsd-3-clause
446
0
11
43
70
41
29
9
1
{-# LANGUAGE TupleSections #-} import CoreSyn import CoreUtils import Id import Type import MkCore import CallArity (callArityRHS) import MkId import SysTools import DynFlags import ErrUtils import Outputable import TysWiredIn import Literal import GHC import Control.Monad import Control.Monad.IO.Class import System.En...
sdiehl/ghc
testsuite/tests/callarity/unittest/CallArity1.hs
bsd-3-clause
10,034
0
25
2,954
4,302
2,379
1,923
200
2
module Formats ( defaultFormat , colorizedFormat , bibtexFormat , RefFormatter ) where import BibTex (Reference(..)) import Search (Filter) import System.Console.ANSI type RefFormatter = [Filter] -> Reference -> [String] defaultFormat :: RefFormatter defaultFormat fs r = key : fields where key ...
palaga/HsBible
Formats.hs
bsd-3-clause
1,232
0
12
395
410
214
196
29
1
-- | Take a single bitcode file and pump it through opt -S and parse -- out the named type definitions (structs, unions, and classes). -- Sort them and print them. -- -- Then use llvm-data-interop to parse the bitcode and print its -- sorted type list. It will be apparent if types were properly -- unified or not. modu...
travitch/llvm-tools
tools/TypeUnificationCheck.hs
bsd-3-clause
2,040
0
15
421
538
281
257
47
2
module Utils.Feeds where import Hakyll myFeedConfiguration :: FeedConfiguration myFeedConfiguration = FeedConfiguration { feedTitle = "自由研究帳" , feedDescription = "Haskellや読んだ論文のまとめ" , feedAuthorName = "Kiripon" , feedAuthorEmail = "" , feedRoot = "http://kiripon.net" }
kiripon/gh-pages
Utils/Feeds.hs
bsd-3-clause
312
0
6
44
51
33
18
9
1
{-# LANGUAGE CPP #-} #ifdef DEBUG_TRACETREE {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} #endif module Distribution.Solver.Modular.Solver ( SolverConfig(..) , solve ) where import Data.Map as M import Data.List as L import Data.Set as S import Distribution.Verbosity import Distr...
themoritz/cabal
cabal-install/Distribution/Solver/Modular/Solver.hs
bsd-3-clause
9,575
0
15
2,598
2,114
1,166
948
124
6
-- Copyright (c) 2008 Stephen C. Harris. -- See COPYING file at the root of this distribution for copyright information. module HMQ.Metadata.PostgreSQL where import Control.Monad import Control.Exception import Text.Regex import Data.Maybe import Database.HDBC import qualified Database.HDBC.PostgreSQL as PG import H...
scharris/hmq
Metadata/PostgreSQL.hs
bsd-3-clause
12,507
0
36
4,669
2,327
1,246
1,081
226
34
import Control.Lens import Control.Monad hiding (forM_, mapM_) import Control.Monad.State (execState) import Data.Aeson import qualified Data.ByteString.Lazy.Char8 as L import Data.Foldable (forM_, mapM_) import Data.IORef import Data.Maybe import Graphics.UI.GLUT import Prelude hiding (mapM_) import Gvty.B...
coffeecup-winner/gvty
gvty.hs
bsd-3-clause
1,221
0
14
276
385
192
193
36
1
----------------------------------------------------------------------------- -- | -- Module : Berp.Base.HashSet -- Copyright : (c) 2011 Bernie Pope -- License : BSD-style -- Maintainer : florbitous@gmail.com -- Stability : experimental -- Portability : ghc -- -- Mutable hashset for the implementation of ...
bjpop/berp
libs/src/Berp/Base/HashSet.hs
bsd-3-clause
3,545
0
17
762
1,028
526
502
83
4
-- | Provides required graph tools. module Database.Algebra.SQL.Materialization.Graph ( Graph , Vertex , mkGraph , parents , children , node , topSort , vertices , reachable ) where import qualified Data.Graph.Inductive.Graph as G import qualified Data.Graph.Inductive.PatriciaTr...
ulricha/algebra-sql
src/Database/Algebra/SQL/Materialization/Graph.hs
bsd-3-clause
1,551
0
9
408
463
264
199
35
1
module Module1.Task12 where sum'n'count :: Integer -> (Integer, Integer) sum'n'count x | x == 0 = (0, 1) | x < 0 = iter 0 0 (-x) | otherwise = iter 0 0 x where iter sum count 0 = (sum, count) iter sum count x = let (x', d) = divMod x 10 in iter (sum + d) (count + 1) x'
dstarcev/stepic-haskell
src/Module1/Task12.hs
bsd-3-clause
313
0
11
106
162
83
79
10
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE StandaloneDeriving #-} module Network.ABCI.Types ( -- * Type-safe 'Request' / 'Response' ...
albertov/hs-abci
src/Network/ABCI/Types.hs
bsd-3-clause
13,086
0
21
3,968
2,732
1,493
1,239
343
1
{-# LANGUAGE TemplateHaskell #-} module Lightray.Types.Camera where import Linear.V3 (V3) import Control.Lens data ViewPlane = ViewPlane { _viewPlaneWidth :: Int , _viewPlaneHeight :: Int , _viewPlaneSize :: Double , _viewPlaneGamma ...
alandao/lightray
src/Lightray/Types/Camera.hs
bsd-3-clause
1,002
0
9
484
158
92
66
19
0
module DB.Order ( create ) where import Import import DB import qualified Database.Persist.Sqlite as P import Data.Text as T create :: MonadIO m => String -> Int -> m (Key SqlPersist (Order)) create name price = do runDB $ P.insert $ Order name price
fujimura/persistent-hspec-example
DB/Order.hs
bsd-3-clause
261
0
11
54
95
53
42
10
1
{-# LANGUAGE RankNTypes #-} -- | Queries and operations on values. Useful for the interpreter and -- constant folding. module Futhark.Representation.AST.Attributes.Values ( valueType , valueShape -- * Rearranging , permuteArray , rotateArray , concatArrays ,...
mrakgr/futhark
src/Futhark/Representation/AST/Attributes/Values.hs
bsd-3-clause
4,398
0
16
1,123
1,587
836
751
90
3
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Test.Jetski.Arbitrary where import qualified Data.List as List import qualified Data.Text as T import Data.Word (Word) import ...
ambiata/jetski
test/Test/Jetski/Arbitrary.hs
bsd-3-clause
1,469
0
15
327
390
219
171
40
3
{-# LANGUAGE FlexibleInstances #-} module Data.TrieMap.WordMap.Subset () where import Control.Monad import Control.Monad.Option import Data.TrieMap.TrieKey import Data.Word import Data.TrieMap.WordMap.Base import Data.TrieMap.WordMap.Searchable () import Prelude hiding (lookup) instance Subset SNode where (<=?)...
lowasser/TrieMap
Data/TrieMap/WordMap/Subset.hs
bsd-3-clause
806
12
15
180
340
190
150
22
0
module B1.Program.Chart.Vbo ( Vbo , VboSpec(..) , createVbo , renderVbo , deleteVbo ) where import Control.Concurrent import Control.Concurrent.MVar import Control.Monad import Data.Array.Storable import Debug.Trace import Foreign.Marshal.Array import Foreign.Ptr import Foreign.Storable import Graphics.Ren...
btmura/b1
src/B1/Program/Chart/Vbo.hs
bsd-3-clause
3,359
0
23
733
939
478
461
95
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( getApplicationDev , appMain , develMain , makeFoundation , makeLogWare , handler , db ) where import Control.Monad.Logger (liftLoc, runLoggingT) import Database.Persist.Sqlite (createSqlitePool, runSqlPool, ...
mithrandi/ucd-api
Application.hs
mit
6,675
0
17
1,689
1,087
579
508
-1
-1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings, ExistentialQuantification, ScopedTypeVariables, ExtendedDefaultRules, FlexibleContexts, TemplateHaskell, MultiParamTypeClasses, OverloadedLabels, TypeOperators, DataKinds, DeriveGeneric, FlexibleInstances #-} import Youido.Serve import Y...
diffusionkinetics/open
youido/examples/Example.hs
mit
6,165
0
26
1,243
2,008
1,024
984
156
3
-- default desktop configuration for Fedora import System.Posix.Env (getEnv, putEnv) import Data.Maybe (maybe) import XMonad import XMonad.Config.Desktop import XMonad.Config.Gnome import XMonad.Config.Kde import XMonad.Config.Xfce main = do session <- getEnv "DESKTOP_SESSION" putEnv "_JAVA_AWT_WM_NONREPAR...
jiangtao9999/MagicSPECS
SPECS.x/xmonad/xmonad.hs
gpl-2.0
529
0
8
78
128
69
59
16
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- ...
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeSnapshots.hs
mpl-2.0
12,422
0
15
2,607
1,377
842
535
139
1
module Widgets.Markdown where import Import import qualified Data.Text as T snowdriftMarkdownField :: (Monad m, HandlerSite m ~ App) => Field m Markdown snowdriftMarkdownField = Field { fieldParse = parseHelper $ Right . Markdown . T.filter (/= '\r') , fieldView = \theId name attrs value _isReq -> do ...
chreekat/snowdrift
Widgets/Markdown.hs
agpl-3.0
1,028
0
14
410
134
75
59
-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="it-IT"> <title>SOAP Scanner | ZAP Extension</title> <maps> <homeID>top</homeID> <mapre...
veggiespam/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_it_IT/helpset_it_IT.hs
apache-2.0
974
80
66
160
415
210
205
-1
-1
module Blub ( blub , foo , bar ) where import Data.Text (Text) import Data.Maybe (Maybe(Just))
jystic/hsimport
tests/goldenFiles/SymbolTest24.hs
bsd-3-clause
107
0
6
28
39
25
14
6
0
{- Author: George Karachalias <george.karachalias@cs.kuleuven.be> Pattern Matching Coverage Checking. -} {-# LANGUAGE CPP, GADTs, DataKinds, KindSignatures #-} {-# LANGUAGE TupleSections #-} module Check ( -- Checking and printing checkSingle, checkMatches, isAnyPmCheckEnabled, -- See Note [...
shlevy/ghc
compiler/deSugar/Check.hs
bsd-3-clause
85,282
59
28
21,677
15,858
8,192
7,666
-1
-1
import Test.HUnit (Assertion, (@=?), runTestTT, Test(..), Counts(..)) import System.Exit (ExitCode(..), exitWith) import Luhn (checkDigit, addends, checksum, isValid, create) exitProperly :: IO Counts -> IO () exitProperly m = do counts <- m exitWith $ if failures counts /= 0 || errors counts /= 0 then ExitFailure...
pminten/xhaskell
luhn/luhn_test.hs
mit
1,285
0
12
296
479
243
236
34
2
{-# language ViewPatterns, NamedFieldPuns, ScopedTypeVariables, MultiParamTypeClasses, DeriveDataTypeable #-} module Sorts.Tiles ( sorts, isTileSort, tileShapeAttributes, mergeTiles, cacheTiles, ) where import Safe import Data.Abelian import Data.Data import Data.List import Data.Maybe imp...
changlinli/nikki
src/Sorts/Tiles.hs
lgpl-3.0
11,829
0
28
2,809
3,357
1,717
1,640
240
3
{-# LANGUAGE TypeFamilyDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE UndecidableInstances #-} module T12522 where foo = f (Just 'c') data D1 x data D2 type family TF x = t | t -> x type instance TF (D1 x, a) = Maybe (TF (x, a)) type instance TF (D2, ()) = Char...
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/T12522.hs
bsd-3-clause
993
0
8
260
324
189
135
-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="sq-AL"> <title>SOAP Support Add-on</title> <maps> <homeID>soap</homeID> <mapref locatio...
kingthorin/zap-extensions
addOns/soap/src/main/javahelp/org/zaproxy/zap/extension/soap/resources/help_sq_AL/helpset_sq_AL.hs
apache-2.0
965
77
67
157
413
209
204
-1
-1
{-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE Strict #-} {-# LANGUAGE Trustworthy #-} {-# LANG...
HIPERFIT/futhark
src/Futhark/TypeCheck.hs
isc
46,997
0
27
12,645
15,206
7,422
7,784
1,274
5
{-# LANGUAGE CPP #-} module GHCJS.DOM.PerformanceEntryList ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.PerformanceEntryList #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.D...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/PerformanceEntryList.hs
mit
373
0
5
33
33
26
7
4
0
-- | -- Module : Control.Concurrent.Actor.Internal -- Copyright : (c) 2014 Forkk -- License : MIT -- Maintainer : forkk@forkk.net -- Stability : experimental -- Portability : GHC only (requires throwTo) -- -- Module exposing more of hactor's internals. Use with caution. -- module Control.Concurrent....
Forkk/hactor
Control/Concurrent/Actor/Internal.hs
mit
7,435
0
12
1,600
1,380
759
621
-1
-1
{-# LANGUAGE CPP #-} module GHCJS.DOM.XMLHttpRequestProgressEvent ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.XMLHttpRequestProgressEvent #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) ...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/XMLHttpRequestProgressEvent.hs
mit
394
0
5
33
33
26
7
4
0
-- ------------------------------------------------------------------------------------- -- Author: Sourabh S Joshi (cbrghostrider); Copyright - All rights reserved. -- For email, run on linux (perl v5.8.5): -- perl -e 'print pack "H*","736f75726162682e732e6a6f73686940676d61696c2e636f6d0...
cbrghostrider/Hacking
HackerRank/FunctionalProgramming/FunctionalStructures/subStrSearchNaive.hs
mit
934
0
12
205
226
110
116
17
2
{-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE MultiParamTypeClasses #-} import Criterion.Main import Text.Ogmarkup import Data.Text (Text) import Data.FileEmbed main = defaultMain [ bench "nf ogmarkup text -> t...
ogma-project/ogmarkup
bench/Bench.hs
mit
982
0
10
215
211
110
101
23
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module GhostLang.Stringify where import Control.Monad (forM_) import Control.Monad.Writer (execWriter, tell) import Data.Char (toLower) import Data.List (intercalate) import Data.Maybe (fromJust, isJust) i...
kosmoskatten/ghost-lang
ghost-lang/test/GhostLang/Stringify.hs
mit
4,701
0
14
1,559
1,486
757
729
105
1
import Control.Monad import Data.List.Extra import Data.Maybe import qualified Data.Char as C import qualified Data.Map as Map import qualified Data.Set as Set ------ iread :: String -> Int iread = read do2 f g x = (f x, g x) answer :: (Show a) => (String -> a) -> IO () answer f = interact $ (++"\n") . show . f ord...
msullivan/advent-of-code
2017/Template.hs
mit
866
0
10
197
377
201
176
25
3
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverlappingInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE UndecidableInstances #-} {- | Description : command-line option parsing class Copyright : (c) Martyn J. Pearce 2014, 2015 License : BSD Maintainer : haskell@sixears.com a class for cm...
sixears/getopt
src/Console/Getopt/CmdlineParseable.hs
mit
1,626
0
9
316
188
111
77
18
0
module Language.MSH.StateDecl ( module Language.MSH.MethodTable, StateMod(..), StateObjCtr(..), StateMemberDecl(..), StateDecl(..), isBaseClass, isAbstractClass, isFinalClass, ctrsForClass ) where import Language.Haskell.TH import Language.Haskell.TH.Syntax import Language.MSH.Me...
mbg/monadic-state-hierarchies
Language/MSH/StateDecl.hs
mit
1,926
0
12
439
503
297
206
49
6
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE NoMonomorphismRestriction #-} module Fun.Direct.Config ( module Fun.Direct.Config, module Fun.Matrix, mktafel2, mkmatrix ) where import Fun.Type import Fun.Matrix import Fun.Table import Autolib.Reader import Autolib.ToDoc import Autolib.Reporter import ...
florianpilz/autotool
src/Fun/Direct/Config.hs
gpl-2.0
808
2
9
156
209
125
84
27
1
{- | Module : $Header$ Description : static basic analysis for FPL Copyright : (c) Christian Maeder, DFKI GmbH 2011 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : portable basic static analysis for FPL -} module Fpl.StatAna ...
nevrenato/Hets_Fork
Fpl/StatAna.hs
gpl-2.0
13,684
0
27
3,754
5,114
2,491
2,623
304
10
{-# OPTIONS -fglasgow-exts -fth #-} ---------------------------------------------------------------------------- -- | -- Module : Text.XML.Serializer.Deriver -- Copyright : (c) Simon Foster 2005 -- License : GPL version 2 (see COPYING) -- -- Maintainer : aca01sdf@shef.ac.uk -- Stability : experiment...
twopoint718/haifa
src/Text/XML/Serializer/Derive.hs
gpl-2.0
5,060
0
24
1,719
1,074
567
507
-1
-1
module Keyboard ( keyDownEvents, Key( .. )) where --import FRP.Helm.Keyboard (Key (..)) --import FRP.Elerea.Param import Data.List (elemIndices) import Foreign (alloca, peekArray, peek, Word8, Ptr) import Foreign.C.Types import Control.Applicative import Data.Traversable (sequenceA) foreign import ccall unsafe "SD...
ZSarver/DungeonDash
src/Keyboard.hs
gpl-3.0
1,176
0
12
206
199
112
87
14
1
module Experiment.GenExperiment where import Prelude import Data.Char data Frnt = CDSL | QDSL deriving Show lower :: String -> String lower = fmap toLower main :: IO () main = sequence_ $ flip map ([(e,f,s) | e <- ["CRC","FFT","IPBW","IPGray","Windowing"] ...
shayan-najd/QFeldspar
Experiment/GenExperiment.hs
gpl-3.0
886
0
34
306
300
159
141
24
1
module GtkUtils where import Graphics.UI.Gtk import Control.Applicative import Data.Maybe import Monad2 import Data.ByteString (ByteString) scrollIt, scrollItV :: WidgetClass widget => widget -> PolicyType -> PolicyType -> IO ScrolledWindow scrollIt widget pol1 pol2 = do scroll <- scrolledWindowNew Nothing Nothing s...
Cadynum/Apelsin
src/GtkUtils.hs
gpl-3.0
5,219
146
14
913
1,765
870
895
-1
-1
{- Ðåàëèçóéòå ôóíêöèè distance, ñ÷èòàþùóþ ðàññòîÿíèå ìåæäó äâóìÿ òî÷êàìè ñ âåùåñòâåííûìè êîîðäèíàòàìè, è manhDistance, ñ÷èòàþùóþ ìàíõýòòåíñêîå ðàññòîÿíèå ìåæäó äâóìÿ òî÷êàìè ñ öåëî÷èñëåííûìè êîîðäèíàòàìè. -} module Demo where data Coord a = Coord a a deriving (Show) distance :: Coord Double -> Coord Double -> Doubl...
devtype-blogspot-com/Haskell-Examples
Distance/Demo.hs
gpl-3.0
509
0
11
83
176
92
84
6
1
{-| Module : Interface.Nasm Description : Copyright : 2014, Jonas Cleve 2015, Tay Phuong Ho 2016, Philip Schmiel License : GPL-3 -} module Interface.Nasm ( NasmCode (..), Register (..), FRegister (..), Location (..), Operand (..), Immediate (..), Instruction (..)...
Potregon/while
src/Interface/Nasm.hs
gpl-3.0
13,716
44
34
4,378
4,055
2,068
1,987
293
1
-- This Source Code Form is subject to the terms of the Mozilla Public -- License, v. 2.0. If a copy of the MPL was not distributed with this -- file, You can obtain one at http://mozilla.org/MPL/2.0/. import Test.Hspec main :: IO () main = hspec $ do describe "Testing framework" $ do it "runs" $ do True...
tel/hotep
test/Spec.hs
mpl-2.0
337
0
14
74
57
29
28
6
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/MyConfig/UpdateUserSettings.hs
mpl-2.0
5,311
0
18
1,203
715
418
297
108
1
-- http://hackage.haskell.org/package/base-4.7.0.0/docs/System-IO-Unsafe.html#v:unsafePerformIO {-# OPTIONS_GHC -fno-cse -fno-full-laziness #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE Bang...
ntc2/haskell-call-trace
src/Data/Function/Decorator/Memoizer/Unsafe.hs
mpl-2.0
2,221
0
15
452
503
265
238
52
1
func :: Int -- basic indentation amount -> Int -- currently used width in current line (after indent) -- used to accurately calc placing of the current-line -> LayoutDesc -> Int
lspitzner/brittany
data/Test275.hs
agpl-3.0
195
0
7
48
21
12
9
5
0
func = [ (thing, take 10 alts) --TODO: select best ones | (thing, _got, alts@(_ : _)) <- nosuchFooThing , gast <- award ]
lspitzner/brittany
data/Test280.hs
agpl-3.0
153
0
11
55
56
32
24
4
1
isDivisibleByAll :: [Integer] -> Integer -> Bool isDivisibleByAll divisors num = all ((==0) . rem num) divisors main = do let divisors = [1..20] print $ head $ filter (isDivisibleByAll divisors) [1..]
ulikoehler/ProjectEuler
Euler5.hs
apache-2.0
209
0
10
40
90
46
44
5
1
{-- Copyright (c) 2014-2020, Clockwork Dev Studio 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 conditions a...
clockworkdevstudio/Idlewild-Lang
CompilerData.hs
bsd-2-clause
5,129
0
10
980
775
464
311
81
1
-- | Benchmarks simple file reading -- -- Tested in this benchmark: -- -- * Reading a file from the disk -- {-# LANGUAGE CPP #-} module Benchmarks.FileRead ( benchmark ) where #if !MIN_VERSION_base(4,8,0) import Control.Applicative ((<$>)) #endif import Test.Tasty.Bench (Benchmark, bgroup, bench, whnfIO) imp...
bos/text
benchmarks/haskell/Benchmarks/FileRead.hs
bsd-2-clause
1,016
0
11
187
264
162
102
21
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE T...
beni55/hermit
src/HERMIT/Shell/ShellEffect.hs
bsd-2-clause
3,178
1
19
733
829
431
398
75
2
{-# language DataKinds #-} {-# language TypeFamilies #-} {-# language GADTs #-} {-# language MultiParamTypeClasses #-} {-# language DeriveDataTypeable #-} {-# language StandaloneDeriving #-} {-# language FlexibleInstances #-} {-# language FlexibleContexts #-} {-# language UndecidableInstances #-} {-# language Rank2Type...
paolino/book-a-visit
client/UI/DateInput.hs
bsd-3-clause
3,401
0
20
588
1,145
625
520
90
3
module Model.State where type State = String
redelmann/e-zimod-server
Model/State.hs
bsd-3-clause
47
0
4
9
12
8
4
2
0
{-# LANGUAGE RankNTypes, GADTs, PolyKinds, UndecidableInstances, DataKinds, KindSignatures, TypeFamilies, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, TypeSynonymInstances, StandaloneDeriving #-} module Elf.Types where import Control.Applicative import Control.Monad import Control.Monad.Reader impo...
edgarklerks/elf-bindings
src/Elf/Types.hs
bsd-3-clause
11,748
0
15
3,484
3,748
1,917
1,831
291
0