code
stringlengths
5
1.03M
repo_name
stringlengths
5
90
path
stringlengths
4
158
license
stringclasses
15 values
size
int64
5
1.03M
n_ast_errors
int64
0
53.9k
ast_max_depth
int64
2
4.17k
n_whitespaces
int64
0
365k
n_ast_nodes
int64
3
317k
n_ast_terminals
int64
1
171k
n_ast_nonterminals
int64
1
146k
loc
int64
-1
37.3k
cycloplexity
int64
-1
1.31k
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} module Cenary.EvmAPI.API ( OpcodeM (..) , toOpcode , stop , add , mul , sub , div , mod , gt , lt , eq , iszero , pop , mload , mstore , mstore8 , sload , sstore , ...
yigitozkavci/ivy
src/Cenary/EvmAPI/API.hs
mit
3,056
0
12
1,081
1,007
576
431
128
4
module System.Logging.Facade.SinkSpec (main, spec) where import Helper import System.Logging.Facade import System.Logging.Facade.Types import System.Logging.Facade.Sink main :: IO () main = hspec spec spec :: Spec spec = do describe "withLogSink" $ do it "sets the globa...
sol/logging-facade
test/System/Logging/Facade/SinkSpec.hs
mit
819
0
17
202
216
112
104
20
1
{-# LANGUAGE MagicHash #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Odin.Engine.Physics ( module PE , External , OdinWorld , OdinScene , World(..) , Body(..) , emptyBody , odinBodyToWorldObj , physicalObj , worldObject , physicalObj2RndTfrms , worldObj2RndTf...
schell/odin
odin-engine/src/Odin/Engine/Physics.hs
mit
4,877
0
11
1,558
1,007
598
409
109
1
{-# LANGUAGE TupleSections #-} -- | Convert the concrete syntax into the syntax of cubical TT. module Resolver where import Control.Applicative import Control.Monad import Control.Monad.Reader import Control.Monad.Except import Control.Monad.Identity import Data.List import Data.Map (Map,(!)) import qualified Data.Ma...
DanGrayson/cubicaltt
Resolver.hs
mit
13,306
0
19
3,280
5,263
2,678
2,585
283
22
module Utils.Options where import System.Console.GetOpt import Utils.Common commonOptions :: [OptDescr Option] commonOptions = [ Option "q" ["quiet"] (NoArg Quiet) "Подавить вывод stdout" , Option "t" ["timeout"] (ReqArg (Timeout . read) "INT") "Время ожидания пользовательского скрипта" , Option "...
kahless/netm
src/Cmd/Utils/Options.hs
mit
1,079
0
10
204
251
134
117
21
1
{-# OPTIONS_GHC -O2 -Wall -fwarn-tabs -Werror #-} ------------------------------------------------------------------------------- -- | -- Module : Lorenz.Logic -- Copyright : Copyright (c) 2014 Michael R. Shannon -- License : MIT -- Maintainer : mrshannon.aerospace@gmail.com -- Stability : unstable ...
mrshannon/lorenz
src/Lorenz/Logic.hs
mit
2,413
0
11
585
639
366
273
35
2
{-# LANGUAGE DeriveDataTypeable #-} {- | Module : ./OWL2/Symbols.hs Copyright : (c) Felix Gabriel Mance License : GPLv2 or higher, see LICENSE.txt Maintainer : f.mance@jacobs-university.de Stability : provisional Portability : portable Symbol items for Hets -} module OWL2.Symbols where import OW...
spechub/Hets
OWL2/Symbols.hs
gpl-2.0
984
0
9
185
241
135
106
19
1
{- | Module : $EmptyHeader$ Description : <optional short description entry> Copyright : (c) <Authors or Affiliations> License : GPLv2 or higher, see LICENSE.txt Maintainer : <email> Stability : unstable | experimental | provisional | stable | frozen Portability : portable | non-portable (<reason>...
nevrenato/Hets_Fork
GMP/versioning/coloss-0.0.4/examples.hml.hs
gpl-2.0
1,337
0
11
314
375
201
174
14
1
{-| This module exports functionality for carrying out operations on files and directories. It uses 'System.Cmd' to carry out these operations. It is used by 'DirectoryOperations' in all it's functions. -} module SystemOperations ( deleteFile, deleteDirectory, move...
michaeldever/haskellfm
SystemOperations.hs
gpl-3.0
5,505
0
26
1,566
874
477
397
82
3
{-# LANGUAGE OverloadedStrings , FlexibleContexts #-} module Handlers.Browse where import Handlers.Chunks import Handlers.App import Schema import Cabal.Types import Imports import Data.Acid.Advanced (query') import qualified Data.Text as T import qualified Data.Text.Lazy as LT import Control.Monad.IO.Class ...
athanclark/happ-store
src/Handlers/Browse.hs
gpl-3.0
1,441
0
17
436
395
201
194
48
2
{-- | This module contains functions that expand on Hakyll's builtin pageination controls to add "Next Page" and "Previous Page" links, and add support for drafts. --} module Site.Pagination (buildPaginate, paginatePostsContext) where import qualified Data.Map as M import Data.Monoid ((<>)) import qual...
budgefeeney/amixtureofmusings
Site/Pagination.hs
gpl-3.0
2,302
0
13
519
565
295
270
37
1
{-# LANGUAGE FlexibleInstances, MultiParamTypeClasses #-} {- Merch.Race.Control.Background - Background task execution. 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 Licen...
AmkG/merchants-race
Merch/Race/Control/Background.hs
gpl-3.0
4,719
0
20
1,447
1,185
576
609
107
9
{- Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can separated into piles in exactly seven different ways, so p(5)=7. OOOOO OOOO O OOO OO OOO O O OO OO O OO O O O O O O O O Find the least value of n for which p(n) is divi...
zhensydow/ljcsandbox
lang/haskell/euler/completed/problem078.hs
gpl-3.0
1,297
0
16
329
540
289
251
31
2
--- | --- | tiger hash calcuation and caching stuff --- | --- Copyright : (c) Florian Richter 2011 --- License : GPL --- module TTH ( getHashForFile , initTTHCache , getCachedHash , hashFileList ) where import Data.Digest.TigerHash import Data.Digest.TigerHash.ByteString import Data.M...
f1ori/hadcc
TTH.hs
gpl-3.0
3,898
0
21
990
1,119
569
550
82
5
{- | Module : $Header$ Description : Mathematical compositions. Copyright : (c) plaimi 2014 License : GPL-3 Maintainer : plailude@plaimi.net -} module Plailude.Function.Compose where -- (.) :: (b -> c) -> (a -> b) -> a -> c -- (f . g) x = f (g x) (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d -- |...
plaimi/plailude
src/Plailude/Function/Compose.hs
gpl-3.0
803
2
10
197
138
88
50
5
1
{-# LANGUAGE FlexibleContexts, NoImplicitPrelude, TemplateHaskell, RankNTypes #-} module Lamdu.Sugar.NearestHoles ( NearestHoles(..), prev, next , none , add ) where import Prelude.Compat import Control.Applicative.Utils (when) import Control.Lens (LensLike) import qualif...
rvion/lamdu
Lamdu/Sugar/NearestHoles.hs
gpl-3.0
2,570
0
14
668
818
439
379
-1
-1
{-| Module : Game.Robo.Core.Lenses Description : Lenses for relevant records. Copyright : (c) Bradley Hardy, 2015 License : GPL3 Maintainer : bradleyhardy@live.com Stability : experimental Portability : non-portable This is in a separate file to enable easy re-exporting of lenses without having to go thr...
bch29/robo-monad
src/Game/Robo/Core/Lenses.hs
gpl-3.0
665
0
6
104
71
35
36
10
0
import Prelude hiding (getLine, putStr) import Data.ByteString.Char8 hiding (head) import Parse import Display main :: IO () main = getLine >>= putStr . asciize asciize :: ByteString -> ByteString asciize s = case parse s of Just x -> display x Nothing -> ":p"
phi16/ASCIIize
Main.hs
gpl-3.0
267
0
8
50
96
52
44
10
2
q :: x -> U n
hmemcpy/milewski-ctfp-pdf
src/content/2.3/code/haskell/snippet08.hs
gpl-3.0
13
0
6
5
13
6
7
1
0
import Test.HUnit import qualified SyntaxTests import qualified DistTests import qualified SemopTests main = do runTestTT SyntaxTests.syntaxTests runTestTT DistTests.distTests runTestTT SemopTests.semopTests
fredokun/piexplorer
src/AllTests.hs
gpl-3.0
226
0
8
38
47
24
23
8
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-android-enterprise/gen/Network/Google/Resource/AndroidEnterprise/Products/Approve.hs
mpl-2.0
5,994
0
21
1,481
877
512
365
128
1
module Message ( module Message ) where import Prelude hiding () import qualified Text.Printf as T (hPrintf) import qualified Data.Text as T (Text(..), pack, unpack, toLower, isPrefixOf, drop, words, tail, singleton, break) import qualified Data.Text.IO as T (putStrLn, hPutStrLn, hGetLine) import System.IO (Han...
bqv/hebi
plugin/haskell/Message.hs
mpl-2.0
7,027
0
16
2,780
2,221
1,161
1,060
136
1
-- | Put all CSS for these widgets in templates/project_feed.cassius module View.SnowdriftEvent where import Import import Model.Comment import Model.Comment.ActionPermissions import Model.Comment.Routes import Model.User import View.Comment import Widgets.Time import qualified Data.Map as M import qualified Data...
chreekat/snowdrift
View/SnowdriftEvent.hs
agpl-3.0
13,921
0
21
4,201
1,752
904
848
-1
-1
import Ring_7 main = do print $ Z 3 == Z 10 print $ [Z 0..Z 6] print $ map abs [Z 0..Z 6] print $ map signum [Z 0..Z 6] print $ map (\k -> 1/k) [Z 1..Z 6] print $ map (\k -> recip k) [Z 1..Z 6]
bestian/haskell-sandbox
r7_test0.hs
unlicense
244
0
11
100
159
73
86
7
1
{-# LANGUAGE BangPatterns #-} import qualified Data.ByteString.Char8 as C import Data.Array.Unboxed import Data.Maybe(fromJust) import Data.Char readint = fst . fromJust . C.readInt dig x = ord x - ord '0' div7 = (\x -> x`mod`7 == 0) . snd . C.foldr go (1, 0) where go c (!k, !r) = (k', r+(u!k) * (dig c)) ...
wangbj/haskell
pucmm025.hs
bsd-2-clause
1,420
0
11
468
799
424
375
42
2
{- | This module reexports type safe routing aproach which should be the default for all Spock applications. To learn more about the routing, read the corresponding blog post available at <http://www.spock.li/2015/04/19/type-safe_routing.html> -} module Web.Spock ( module Web.Spock.Safe ) where import Web.Spoc...
nmk/Spock
src/Web/Spock.hs
bsd-3-clause
327
0
5
51
22
15
7
3
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. {-# LANGUAGE GADTs #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.Volume.AR....
facebookincubator/duckling
Duckling/Volume/AR/Rules.hs
bsd-3-clause
2,612
0
12
618
625
368
257
65
1
{-# LANGUAGE BangPatterns #-} module Y2017.Day17 (answer1, answer2) where import qualified Data.Vector as V import Data.Maybe import Data.Foldable import Data.Monoid answer1, answer2 :: IO () answer1 = print $ solve1 input answer2 = let (_, _, val) = foldl' (step2 input) (0, 1, Nothing) [1 .. 50 * 10 ^ 6] in...
geekingfrog/advent-of-code
src/Y2017/Day17.hs
bsd-3-clause
911
0
12
261
422
230
192
25
2
module Testrs where import Data.Conduit import Data.Conduit.Binary someFunc :: IO () someFunc = putStrLn "someFunc"
ppp4ppp/test3
src/Testrs.hs
bsd-3-clause
119
0
6
18
33
19
14
5
1
{-# LANGUAGE TypeFamilies, FlexibleInstances, MultiParamTypeClasses, RecordWildCards, DoAndIfThenElse, EmptyDataDecls, PatternGuards #-} module CLI where import Control.Monad.Trans import Control.Monad.Trans.State.Strict import Control.Monad.Trans.Reader import Control.Monad.IO.Class import Control.Monad import Contr...
luqui/tigress
CLI.hs
bsd-3-clause
18,823
0
22
5,684
6,348
3,207
3,141
-1
-1
module DobadoBots.GameEngine.Collisions ( nearestIntersection ,nearestDistance ,robotObjectiveIntersection ,robotColliderDistance ) where import Linear.V2 (V2(..)) import qualified Data.Foldable as F (toList) import qualified Data.SG.Geometry as GG (alongLine) import q...
NinjaTrappeur/DobadoBots
src/DobadoBots/GameEngine/Collisions.hs
bsd-3-clause
5,501
0
13
1,715
1,509
834
675
86
2
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ScopedTypeVariables #-} -- | See "Control.Monad.Ether.Except". module Control.Monad.Ether.Implicit.Except ( -- * MonadExcept class MonadExcept , throw , catch -- * The Except monad , Except , runExcept -- * The ExceptT monad transform...
bitemyapp/ether
src/Control/Monad/Ether/Implicit/Except.hs
bsd-3-clause
1,736
0
11
336
429
239
190
33
1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DataKinds #-} module Monad ( module Monad , AuditEvent(..) ) where import Control.Lens import Control.Monad.Reader import Data.Default (def) import Database.Persist.Sql import qualified NejlaCommon as NC impo...
nejla/auth-service
service/src/Monad.hs
bsd-3-clause
1,601
0
10
412
328
180
148
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveDataTypeable #-} import System.Environment import Control.Monad import Control.Applicative import Control.Distributed.Process import Control.Distributed.Process.Node import Network.Transport.TCP (createTransport, defaultTCPParameters, defaultTCPAddr) import Data.Binary ...
haskell-distributed/distributed-process
benchmarks/Throughput.hs
bsd-3-clause
2,018
0
16
488
776
390
386
60
2
-- | -- module: Data.Text.Lazy.Encoding.Locale -- copyright: © kudah 2013 -- license: BSD3 -- -- maintainer: kudahkukarek@gmail.com -- stability: experimental -- portability: GHC-only -- -- This module provides functions to encode and decode 'Data.Text.Lazy.Text' -- to/from 'Data.ByteString.Lazy.ByteString' using 'Syst...
exbb2/text-locale-encoding
Data/Text/Lazy/Encoding/Locale.hs
bsd-3-clause
4,637
0
21
1,142
1,229
618
611
87
6
{-| Copyright : (c) Dave Laing, 2017 License : BSD3 Maintainer : dave.laing.80@gmail.com Stability : experimental Portability : non-portable -} module Fragment.Bool.Helpers ( tyBool , ptBool , tmBool , tmAnd , tmOr ) where import Control.Lens (review) import Ast.Type import Ast.Pattern import A...
dalaing/type-systems
src/Fragment/Bool/Helpers.hs
bsd-3-clause
899
0
8
197
316
165
151
23
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.IndirectParameters -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Porta...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/IndirectParameters.hs
bsd-3-clause
839
0
5
108
65
48
17
11
0
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# language LambdaCase #-} module BMake.Interpreter ( interpret ) where import BMake.Base import Control.DeepSeq (NFData(..), force) import Control.Exception (evaluate) import Control.Monad.IO.Class (Mona...
Peaker/buildsome-tst
app/BMake/Interpreter.hs
bsd-3-clause
7,678
0
15
2,236
2,136
1,122
1,014
167
14
------------------------------------------------------------------------ -- | -- Module : Data.CSV.Condense -- Copyright : (c) Amy de Buitléir 2014 -- License : BSD-style -- Maintainer : amy@nualeargais.ie -- Stability : experimental -- Portability : portable -- -- Condenses a CSV table. The values i...
mhwombat/amy-csv
src/Data/CSV/Condense.hs
bsd-3-clause
2,539
0
11
571
651
372
279
32
1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} {-| 'Pipe's for doing IO with text data. -} module Control.Pipe.Text.IO ( -- * Producers produceFile , produceHandle , produceIOHandle -- ** Ranges , produceFileRange , produceHandleRange , produceIOHandleRange ...
duairc/pipes
src/Control/Pipe/Text/IO.hs
bsd-3-clause
5,907
0
11
1,306
1,071
568
503
117
1
module Config.Routes where routes = [ "/:controller/:action/:id.:format" , "/:controller/:action/:id" , "/:controller/:action.:format" , "/:controller/:action" , "/:controller" ]
abuiles/turbinado-blog
Config/Routes.hs
bsd-3-clause
225
0
5
62
26
17
9
6
1
module Lava.Error ( Error(..) , wrong ) where ---------------------------------------------------------------- -- Error data Error = DelayEval | VarEval | CombinationalLoop | BadCombinationalLoop | UndefinedWire | IncompatibleStructures | NoEquality | NoArithmetic | EnumOnSymbols | Interna...
shayan-najd/MiniLava
Lava/Error.hs
bsd-3-clause
1,250
0
9
318
180
101
79
32
10
{-# LANGUAGE MultiParamTypeClasses, TypeFamilies, FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# OPTIONS -Wall #-} module LambdaCalculus.Operations( getvalfromenv, setvalinenv, transtate, trans ) where import Basic.Memory import Basic.Types (Trans(Trans)) import LambdaCalculus.Types import Control....
davidzhulijun/TAM
LambdaCalculus/Operations.hs
bsd-3-clause
3,494
0
27
1,499
1,492
774
718
81
8
{-# LANGUAGE ScopedTypeVariables #-} import Prelude hiding (concat) import Data.Word import Data.Hash.SL2 import Data.Hash.SL2.Internal (Hash) import Data.Hash.SL2.Unsafe import qualified Data.ByteString as B import Foreign import Test.Tasty import Test.Tasty.QuickCheck as QC import Test.QuickCheck.Property.Monoi...
srijs/hwsl2-haskell
src/Data/Hash/SL2/Test.hs
mit
2,793
0
18
854
1,008
532
476
71
1
{-| Instances for anonymizing sensitive data in various types. Note that there is no clear way to anonymize numbers. -} module Hledger.Cli.Anon ( Anon(..) , anonAccount ) where import Control.Arrow (first) import Data.Hashable (hash) import Data.Word (Word32) import Numeric (showHex) import qualified D...
simonmichael/hledger
hledger/Hledger/Cli/Anon.hs
gpl-3.0
1,934
0
11
606
460
253
207
32
1
module Main where import AI.HNN.Net import AI.HNN.Layer import AI.HNN.Neuron import Control.Arrow import Data.List alpha, epsilon :: Double alpha = 0.8 -- learning ratio epsilon = 0.001 -- desired maximal bound for the quad error layer1, layer2 :: [Neuron] layer1 = map (createNeuronSigmoid 0.5) [[0.5, 0.5, 0.5...
alpmestan/HNN-0.1
tests/xor-3inputs.hs
lgpl-3.0
1,091
0
8
249
416
245
171
33
1
module Handler.Nomnichi ( getNomnichiR -- ノムニチトップ , getCreateArticleR -- 記事投稿ページの表示 , postCreateArticleR -- 記事の投稿 , getArticleR -- 記事の表示 , postArticleR -- 記事の編集 , getEditArticleR -- 記事の編集画面の表示 , postDeleteArticleR -- 記事の削除 , postCommentR -- コメントの投稿 ) where import Import a...
ikeda-yuko/nomnichi-haskell
Handler/Nomnichi.hs
bsd-2-clause
6,566
0
18
1,361
1,679
821
858
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TemplateHaskell #-} module Ros.Geometry_msgs.Pose where import qualified Prelude as P import Prelude ((.), (+), (*)) import qualified Data.Typeable as T import Control.Applicative import Ros.Internal.RosBi...
acowley/roshask
msgs/Geometry_msgs/Ros/Geometry_msgs/Pose.hs
bsd-3-clause
1,499
1
11
247
429
249
180
37
0
module Main(main) where import Flickr.API import Util.Keys ( hsflickrAPIKey ) import Flickr.Photos as Photos import System.Environment searchPhotos :: String -> FM [PhotoDetails] searchPhotos q = do (_, ps) <- Photos.search Nothing nullSearchConstraints{s_text=Just q} [] mapM (\ x -> Photos.getInfo (photoId x) N...
sof/flickr
examples/SearchPhotos.hs
bsd-3-clause
701
0
21
156
276
139
137
20
2
{-# LANGUAGE FlexibleContexts, FlexibleInstances, MultiParamTypeClasses #-} module Opaleye.Internal.RunQuery where import Control.Applicative (Applicative, pure, (<*>), liftA2) import Database.PostgreSQL.Simple.Internal (RowParser) import Database.PostgreSQL.Simple.FromField (FieldParse...
bergmark/haskell-opaleye
src/Opaleye/Internal/RunQuery.hs
bsd-3-clause
10,751
0
18
2,200
2,321
1,267
1,054
167
4
-- | -- Module : Crypto.System.CPU -- License : BSD-style -- Maintainer : Olivier Chéron <olivier.cheron@gmail.com> -- Stability : experimental -- Portability : unknown -- -- Gives information about cryptonite runtime environment. -- {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE Fore...
vincenthz/cryptonite
Crypto/System/CPU.hs
bsd-3-clause
1,888
0
12
330
321
189
132
31
1
{- | Module : Data.Vector.Parallel Copyright : (c) Paweł Nowak License : MIT Maintainer : pawel834@gmail.com Stability : experimental Parallel vector operations. -} module Data.Vector.Parallel where import Control.Parallel.Strategies import Data.Foldable import Data.V...
pawel-n/machine-learning
src/Data/Vector/Parallel.hs
mit
1,190
0
13
312
335
175
160
22
1
-- -- | Names of haskell functions used in the Pl code -- module Plugin.Pl.Names where import Plugin.Pl.Common -- | Expressions with holes -- No MLambda here because we only consider closed Terms (no alpha-renaming!). -- Has to be in this module, otherwise we get recursion data MExpr = MApp !MExpr !MExpr -- ^ A...
jwiegley/lambdabot
Plugin/Pl/Names.hs
mit
2,960
0
7
842
973
554
419
80
1
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell, MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleInstances, ViewPatterns #-} module YesodCoreTest.Links ( linksTest , Widget , resourcesY ) where import Test.Hspec import Yesod.Core import Network.Wai import Netw...
psibi/yesod
yesod-core/test/YesodCoreTest/Links.hs
mit
2,940
0
18
579
778
405
373
-1
-1
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fprof-auto-top #-} -- -- Copyright (c) 2010, João Dias, Simon Marlow, Simon Peyton Jones, -- and Norman Ramsey -- ...
forked-upstream-packages-for-ghcjs/ghc
compiler/cmm/Hoopl/Dataflow.hs
bsd-3-clause
35,959
252
64
10,768
9,847
5,117
4,730
495
14
{-# LANGUAGE ScopedTypeVariables #-} module Demote.UsedAtLevel2 where foo :: IO () foo = do let xx = uses declaredPns [] return () where ---find how many matches/pattern bindings use 'pn'------- -- uses :: [GHC.Name] -> [GHC.LHsBind GHC.Name] -> [Int] uses pns t2 =...
RefactoringTools/HaRe
test/testdata/Demote/UsedAtLevel2.expected.hs
bsd-3-clause
1,074
0
15
393
326
173
153
26
3
module FindFixpoint(Ms, getVal, solve) where import Array import Control.Monad.Writer import Data.Array.IO import Data.Graph import Data.IntSet as IntSet import Util.Gen data Env b = Env {-# UNPACK #-} !(IOArray Int b) {-# UNPACK #-} !(IOArray Int (IntSet)) {-# UNPACK #-} !Int newtype Ms b c = Ms' (Env b -> IO c) i...
m-alvarez/jhc
src/FindFixpoint.hs
mit
2,395
1
21
876
1,028
506
522
64
6
{-# OPTIONS_GHC -fwarn-incomplete-patterns -fwarn-overlapping-patterns #-} {-# LANGUAGE OverloadedStrings #-} module PMC007 where -- overloaded f "ab" = () f "ac" = () -- non-overloaded g :: String -> () g "ab" = () g "ac" = () -- non-overloaded due to type inference h :: String -> () h s = let s' = s in cas...
ezyang/ghc
testsuite/tests/pmcheck/should_compile/pmc007.hs
bsd-3-clause
374
0
10
100
110
59
51
13
2
{-# LANGUAGE ParallelArrays #-} {-# OPTIONS -fvectorise #-} module QuickHullVect (quickhull) where import Types import Data.Array.Parallel import Data.Array.Parallel.Prelude.Double as D import qualified Data.Array.Parallel.Prelude.Int as Int import qualified Prelude as P distance :: Point -> Line -> Double distanc...
urbanslug/ghc
testsuite/tests/dph/quickhull/QuickHullVect.hs
bsd-3-clause
1,208
33
11
260
541
298
243
30
1
-- | Convenient common interface for command line Futhark compilers. -- Using this module ensures that all compilers take the same options. -- A small amount of flexibility is provided for backend-specific -- options. module Futhark.Compiler.CLI ( compilerMain , CompilerOption , CompilerMode(..) ...
ihc/futhark
src/Futhark/Compiler/CLI.hs
isc
4,717
0
17
1,400
951
524
427
86
2
{- My wife and I recently attended a party at which there were four other married couples. Various handshakes took place. No one shook hands with oneself, nor with one's spouse, and no one shook hands with the same person more than once. After all the handshakes were over, I asked each person, including my wife, how m...
glguy/5puzzle
Handshakes.hs
isc
1,855
0
14
544
514
282
232
35
1
{-# LANGUAGE NoImplicitPrelude #-} module Advent.Day3Spec (main, spec) where import Advent.Day3 import BasePrelude import Test.Hspec main :: IO () main = hspec spec spec :: Spec spec = do describe "day3Part1" $ do it "count the houses according to directions" $ do day3part1 ...
jhenahan/adventofcode
test/Advent/Day3Spec.hs
mit
602
0
14
160
168
85
83
19
1
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified HoogleApi as H import Control.Monad import Control.Monad.STM import Control.Concurrent.Async (async, wait) import Control.Concurrent (threadDelay, forkIO) import Control.Concurrent.STM.TChan import qualified Data.Text.IO as T import Data.Text ...
muhbaasu/telegram-hoogle-bot
src/Main.hs
mit
2,839
0
18
597
876
438
438
68
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE NamedFieldPuns #-} module Nauva.Catalog ( CatalogProps(..) , catalog , module Nauva.App , module Nauva.View , module Nauva.Catalog.Types ) where import ...
wereHamster/nauva
pkg/hs/nauva-catalog/src/Nauva/Catalog.hs
mit
5,286
0
20
1,534
1,461
784
677
113
7
module Data.String.StripSpec (spec) where import Test.Hspec import Data.String.Strip spec :: Spec spec = do describe "strip" $ do it "removes leading and trailing whitespace" $ do strip "\t foo bar\n" `shouldBe` "foo bar"
hspec/hspec-example
test/Data/String/StripSpec.hs
mit
237
0
14
48
65
35
30
8
1
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} module Travis.Types where import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), withObject, (.:)) import Data.Aeson.Types (Object (..), Parser (..), defaultOptions, ...
tomtau/travis
src/Travis/Types.hs
mit
3,381
0
10
1,312
593
358
235
75
0
----------------------------------------------------------------------------- -- | -- Module : Reactive.Banana.JsHs -- Copyright : (c) Artem Chirkin -- License : MIT -- -- Maintainer : Artem Chirkin <chirkin@arch.ethz.ch> -- Stability : experimental -- -- ---------------------------------------------...
mb21/qua-kit
libs/hs/reactive-banana-ghcjs/src/Reactive/Banana/JsHs.hs
mit
615
0
4
107
48
39
9
6
0
{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} -- | Block processing related workers. module Pos.Worker.Block ( blkWorkers ) where import Universum import Control.Lens (ix) import qualified Data.List.NonEmpty as NE import ...
input-output-hk/pos-haskell-prototype
lib/src/Pos/Worker/Block.hs
mit
24,385
0
21
6,512
4,561
2,367
2,194
-1
-1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} module Bot.GameAPI ( getKills , GameEvent (..) , Character (..) , Event (..) ) where import Control.Applicat...
narrative/achaeabot
src/Bot/GameAPI.hs
mit
5,010
0
16
1,505
1,544
803
741
134
3
{-# htermination (toEnumChar :: MyInt -> Char) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Char = Char MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; primIntToChar :: MyInt -> Char; primIntToChar x = Char x; toEnumChar :: MyInt...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/toEnum_4.hs
mit
360
0
8
84
112
66
46
10
1
import Classifier.NBClassifier call:: String -> IO () call file = do classifier <- buildNBClassifier file case classifier of Right a -> do putStrLn "\nHeader\n" ...
anirudhhkumarr/ml-lib
Examples/printData.hs
gpl-2.0
509
0
13
310
110
46
64
13
2
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, PatternGuards #-} {- Copyright (C) 2006-2014 John MacFarlane <jgm@berkeley.edu> Copyright (C) 2014 Tim T.Y. Lin <timtylin@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licens...
timtylin/scholdoc
src/Text/Pandoc/Writers/LaTeX.hs
gpl-2.0
57,974
0
41
19,541
15,459
7,763
7,696
1,080
32
module Type.Quiz where -- $Id$ import Type.Data import Type.Check import Autolib.NFTA import Autolib.NFTA.Shortest ( shortest, shortest0 ) import Autolib.Size import Autolib.ToDoc import Autolib.NFTA.Trim import Autolib.NFTA.Normalize import qualified Autolib.Relation as Relation import Autolib.Informed import Aut...
florianpilz/autotool
src/Type/Quiz.hs
gpl-2.0
2,494
22
16
789
971
509
462
-1
-1
module Numerical.PETSc.TestFEM where import Numerical.PETSc.Test2 import Foreign.C.Types import Control.Monad import Control.Concurrent import Control.Exception import Foreign import qualified Data.Vector as V t11' h m n = withMatAssembleQ4 cs m n (ke h) $ \mat -> matViewStdout mat where cs = commWorld ...
ocramz/petsc-hs
examples/TestFEM.hs
gpl-3.0
1,130
0
10
292
539
294
245
35
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} module FreeTracker.Database.TH ( persist , persistFile , derivePersistField , IssueFieldType(..) ) where import Data.Char import qualified Data.Text as T import Databa...
sirius94/free-tracker
free-tracker-server/src/FreeTracker/Database/TH.hs
gpl-3.0
890
0
12
196
193
115
78
26
1
module Mastermind where import Control.Monad (replicateM) import Data.List ((\\), sort, group) type Color = Int type Pattern = [Color] type Feedback = (Int, Int) type Turn = (Pattern, Feedback) parseTurns :: [String] -> [Turn] parseTurns [] = [] parseTurns (p : f : ts) = (p', f') : parseTurns ts where p' = map (re...
bolo1729/Mastermind
Mastermind.hs
gpl-3.0
1,402
0
13
308
723
392
331
33
1
module CodeGen (codeGen,genMain) where import Control.Monad(foldM,unless,when,zipWithM_) import Data.Char(isAlphaNum,isAscii,ord) import Data.Set(Set) import qualified Data.Set as Set import Ast(Identifier(..),Param(..),Def(..),Expr(..),Func) import GenLLVM (GenLLVM,Local,Label,genLLVM, writeCode,writeLo...
qpliu/esolang
01_/hs/compiler2/CodeGen.hs
gpl-3.0
59,554
0
27
15,217
14,354
6,356
7,998
1,322
5
{-# LANGUAGE OverloadedStrings #-} -- | Implements the org.mpris.MediaPlayer2 interface. -- -- More information at <http://specifications.freedesktop.org/mpris-spec/latest/Media_Player.html> module DBus.Mpris.MediaPlayer2 ( module DBus.Mpris.MediaPlayer2.Methods , module DBus.Mpris.MediaPlayer2.Propertie...
Fuco1/mpris
src/DBus/Mpris/MediaPlayer2.hs
gpl-3.0
500
0
5
65
58
43
15
8
0
{- Symbol This file is part of AEx. Copyright (C) 2016 Jeffrey Sharp AEx 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...
sharpjs/haskell-learning
src/Aex/Symbol.hs
gpl-3.0
876
1
9
223
52
31
21
11
0
-- | Parse HMMCompare output module Bio.HMMCompareResult ( HMMCompareResult(..), parseHMMCompareResult, readHMMCompareResult, getHMMCompareResults, getModelsNames, getModelNames ) where import Text.ParserCombinators.Parsec import Data.List -- | Datastructure for result strings o...
eggzilla/BioHMM
src/Bio/HMMCompareResult.hs
gpl-3.0
3,499
0
18
714
836
417
419
73
1
module JSBoiler.Statement where import Data.Text (Text) data Statement = Expression Expression | ConstDeclaration [(Declaration, Expression)] | LetDeclaration [(Declaration, Maybe Expression)] | BlockScope [Statement] | IfStatement { condition :: Expressi...
cuklev/JSBoiler
src/JSBoiler/Statement.hs
gpl-3.0
2,528
0
9
1,072
450
264
186
49
0
--reverse implementada myReverse :: [a] -> [a] myReverse [] = [] myReverse xs = last xs : myReverse (init xs) --fibo
jmlb23/haskell
ch07/exercicies.hs
gpl-3.0
122
0
8
26
54
28
26
3
1
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_HaScheme ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception imp...
jdcannon/hascheme
.stack-work/dist/x86_64-linux-ncurses6-nopie/Cabal-1.24.2.0/build/autogen/Paths_HaScheme.hs
gpl-3.0
2,299
0
10
239
410
238
172
33
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPSProxies/Insert.hs
mpl-2.0
3,623
0
15
803
395
238
157
65
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-proximitybeacon/gen/Network/Google/Resource/ProximityBeacon/Beacons/Register.hs
mpl-2.0
6,255
0
19
1,507
949
554
395
130
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-script/gen/Network/Google/Resource/Script/Projects/Versions/Create.hs
mpl-2.0
5,141
0
18
1,195
785
458
327
114
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/FirewallPolicies/Get.hs
mpl-2.0
3,107
0
14
683
313
192
121
54
1
module Main where import CommonMain import DictMt import CompositeMt import CommandsMt import Frontend main :: IO () main = commonMain Maltese data Maltese = Maltese deriving Show instance Language Maltese where internDict _ = malteseDict -- composition _ = decomposeMt composition _ = Just $ compDesc parad...
johnjcamilleri/maltese-functional-morphology
malti/Main.hs
lgpl-3.0
409
0
6
77
102
57
45
15
1
add a b = a + b -- add 4 5 add' a b c = a + b + c -- add' (add 3 4) 5 6 add'' a b c d = a + b + c + d add003composed = sum [add 1 2, add' 3 4 5, add'' 6 7 8 9] -- *Main> add003composed -- 45
evx001/FS
_fs/adder.hs
apache-2.0
202
0
7
72
103
53
50
4
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -- | This module allows for lazy decoding of hadoop sequence files from a lazy -- 'L.ByteString'. In the future an incremental API using strict -- 'Data.ByteString.ByteString' will be ...
jystic/hadoop-formats
src/Data/Hadoop/SequenceFile.hs
apache-2.0
3,257
0
10
769
587
331
256
43
2
{-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE RankNTypes #-} {- Copyright 2020 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in...
google/codeworld
codeworld-api/src/CodeWorld/Parameter.hs
apache-2.0
14,183
0
17
3,564
4,813
2,590
2,223
316
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Openshift.V1.ContainerPort where import GHC.Generics import Data.Text import qualified Data.Aeson -- | ContainerPort represents a network port...
minhdoboi/deprecated-openshift-haskell-api
openshift/lib/Openshift/V1/ContainerPort.hs
apache-2.0
1,246
0
9
235
120
73
47
18
0
module SSync.SignatureTable ( SignatureTable , emptySignature , emptySignature' , consumeSignatureTable , SignatureTableException(..) ) where import SSync.SignatureTable.Internal
socrata-platform/ssync
src/main/haskell/SSync/SignatureTable.hs
apache-2.0
182
0
5
19
33
22
11
7
0
{- - Copyright 2012 Fabio Riga - - 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 i...
EffeErre/cbladmin
src/Defaults.hs
apache-2.0
963
0
5
155
67
41
26
10
1
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QStyleOptionProgressBar.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:30 Warning : this file is machine gene...
uduki/hsQt
Qtc/Gui/QStyleOptionProgressBar.hs
bsd-2-clause
6,570
0
12
851
1,564
809
755
-1
-1
module Main (main) where import System.Exit import System.Environment import System.IO import System.Console.GetOpt import Text.ParserCombinators.Parsec import Text.Printf import Data.List (intersect, intercalate) import qualified Data.Char as Char import qualified Data.Set as Set import qualified Data.Map as Map impo...
spatial-reasoning/homer
homer.hs
bsd-2-clause
8,638
0
28
2,865
2,172
1,143
1,029
167
3
{-# LANGUAGE DeriveDataTypeable #-} module Propellor.Types.Docker where import Propellor.Types import Propellor.Types.Empty import Propellor.Types.Info import Data.Monoid import qualified Data.Map as M data DockerInfo = DockerInfo { _dockerRunParams :: [DockerRunParam] , _dockerContainers :: M.Map String Host } ...
ArchiveTeam/glowing-computing-machine
src/Propellor/Types/Docker.hs
bsd-2-clause
922
36
9
142
263
148
115
25
0
module Network.BitcoinRPC.TestTypes ( ArbBitcoinAddress(..) , ArbTransactionID(..) , ArbBitcoinAmount(..) , ArbTransaction(..) ) where import Control.Applicative import Test.QuickCheck import qualified Data.Text as T import Network.BitcoinRPC.Types -- Define newtype wrappers to avoid the 'orphan...
javgh/bitcoin-rpc
Network/BitcoinRPC/TestTypes.hs
bsd-3-clause
1,672
0
14
474
488
267
221
40
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE Typ...
Garygunn94/DFS
ClientProxy/.stack-work/intero/intero9387mAF.hs
bsd-3-clause
4,781
12
12
1,306
1,070
563
507
119
4
module Day8 where -- unfinished, grids are lameassshit import Grid import Data.Char import Text.Megaparsec import Text.Megaparsec.String import qualified Data.Map as M -- screen = 50x6 data Pixel = Hash | Dot deriving (Show, Eq, Enum) ppPixel :: Pixel -> String ppPixel Hash = "#" ppPixel Dot = "." screen = grid...
MarcelineVQ/advent2016
src/Day8.hs
bsd-3-clause
1,853
0
15
376
752
381
371
45
1