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 OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS -fno-warn-unused-do-bind #-} -- | Guide page view. module HL.View.Guide where import HL.View import HL.View.Template -- | Guide view. guideV :: FromLucid App guideV = template [] "Guide" (\url -> container_ ...
commercialhaskell/commercialhaskell.com
src/HL/View/Guide.hs
bsd-3-clause
450
0
16
131
91
50
41
17
1
module Resolve.DNS.Transport.Exceptions where import qualified Resolve.DNS.Exceptions as DNS import Control.Exception import Data.Typeable data Error where Error :: Exception e => e -> Error deriving (Typeable) instance Show Error where show (Error e) = show e instance Exception Error where toException = DN...
riaqn/resolve
src/Resolve/DNS/Transport/Exceptions.hs
bsd-3-clause
539
0
8
89
153
82
71
-1
-1
module Token where data Token = Identifier String | Number Integer | Label String | StringLit String -- Registers | RAX | RBX | RCX | RDX | RSI | RDI | RBP | RSP | R8 ...
dosenfrucht/mcasm
src/Token.hs
gpl-2.0
1,383
0
6
950
232
153
79
69
0
{-| Module : Backend.CBackend Description : A C backend module Stability : experimental This backend targets C code. __TODO__: put the real values of env size and choice size in emitCode -} module Backend.CBackend ( emitCode ) where import Backend.Codegen import Backend.SeqAST import Control.Mona...
piccolo-lang/piccolo
src/Backend/CBackend.hs
gpl-3.0
12,666
0
12
2,729
4,277
1,785
2,492
494
2
{-# LANGUAGE CPP #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE ParallelListComp #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE...
PipocaQuemada/ermine
src/Ermine/Pattern/Matrix.hs
bsd-2-clause
3,646
0
19
804
998
524
474
69
1
{-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Keymap.Vim.Ex.Commands.Sort -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable module Yi.Keymap.Vim.Ex.Commands.Sort (parse) where import ...
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Sort.hs
gpl-2.0
1,462
0
11
412
360
210
150
28
2
{-# LANGUAGE CPP, NamedFieldPuns, NondecreasingIndentation #-} {-# OPTIONS_GHC -fno-cse #-} -- -fno-cse is needed for GLOBAL_VAR's to behave properly ----------------------------------------------------------------------------- -- -- GHC Driver -- -- (c) The University of Glasgow 2005 -- ------------------------------...
vTurbine/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
101,359
0
31
34,069
16,129
8,171
7,958
1,368
43
{-# LANGUAGE OverloadedStrings #-} module Blockchain.Data.GenesisBlock ( initializeGenesisBlock, initializeStateDB ) where import Control.Monad import Control.Monad.IO.Class import Control.Monad.Trans.Resource import Control.Monad.Trans.State import qualified Data.ByteStrin...
jamshidh/ethereum-data-sql
src/Blockchain/Data/GenesisBlock.hs
bsd-3-clause
3,884
0
17
1,016
798
482
316
69
1
-------------------------------------------------------------------- -- | -- Module : Test.Framework.Providers.SmallCheck -- Copyright : (c) Roman Cheplyaka -- License : BSD3 -- Maintainer: Roman Cheplyaka <roma@ro-che.info> -- -- This module allows to use SmallCheck properties in test-framework. -----------------...
jdnavarro/smallcheck
test-framework-smallcheck/Test/Framework/Providers/SmallCheck.hs
bsd-3-clause
3,089
0
21
661
719
382
337
62
2
{-# LANGUAGE CPP #-} #if !defined(MIN_VERSION_Cabal) # define MIN_VERSION_Cabal(x,y,z) 0 #endif import Control.Monad import Data.IORef import Control.Exception (SomeException, catch) import Distribution.Simple import Distribution.Simple.BuildPaths import Distribution.Simple.InstallDirs as I import Distribution.Simpl...
uuhan/Idris-dev
Setup.hs
bsd-3-clause
13,159
0
18
3,492
2,589
1,336
1,253
204
3
module System.Taffybar.Information.CPU ( cpuLoad ) where import Control.Concurrent ( threadDelay ) import System.IO ( IOMode(ReadMode), openFile, hGetLine, hClose ) procData :: IO [Double] procData = do h <- openFile "/proc/stat" ReadMode firstLine <- hGetLine h length firstLine `seq` return () hClose h ret...
teleshoes/taffybar
src/System/Taffybar/Information/CPU.hs
bsd-3-clause
954
0
11
220
330
170
160
28
1
module ListComp1 where -- even though in a list comprehension -- should still introduce the runEval in a let binding... qsort (x:xs) = res where res = [ (p,q) | p <- (filter (< x) xs), q <- (filter (>= x) xs) ]
RefactoringTools/HaRe
old/testing/evalMonad/ListComp1.hs
bsd-3-clause
220
0
12
52
77
45
32
3
1
module C where import B foo :: () foo = variableNotInScope
sdiehl/ghc
testsuite/tests/ghci/prog018/C.hs
bsd-3-clause
61
0
5
13
19
12
7
4
1
module Scope3 where import Control.Parallel.Strategies f = 42 b = f 76 g = runEval ( do d <- f; return d ) computation = f + b
RefactoringTools/HaRe
old/testing/evalAddEvalMon/Scope3.hs
bsd-3-clause
133
0
9
34
57
31
26
6
1
{-# LANGUAGE FlexibleInstances, Rank2Types, BangPatterns, CPP #-} -- | -- Module : Data.Vector.Fusion.Stream -- Copyright : (c) Roman Leshchinskiy 2008-2010 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : non-portable -- -- S...
mightymoose/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector/Fusion/Stream.hs
bsd-3-clause
16,717
0
14
4,467
4,728
2,558
2,170
342
7
<?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="es-ES"> <title>Passive Scan Rules | ZAP Extension</title> <maps> <homeID>top</homeID> ...
msrader/zap-extensions
src/org/zaproxy/zap/extension/pscanrules/resources/help_es_ES/helpset_es_ES.hs
apache-2.0
982
80
66
161
417
211
206
-1
-1
main = do -- NOTE: the `abs` is to compensate for WAY=optllvm -- having a positive sign for 0/0 putStrLn "## Double ##" print $ idRational ( 1/0 :: Double) print $ idRational (-1/0 :: Double) print $ abs $ idRational ( 0/0 :: Double) print $ idReencode ( 1/0 :: Double) print $ idR...
beni55/ghcjs
test/ghc/numeric/t9810.hs
mit
886
0
11
241
212
109
103
12
1
module T9233 where import T9233a import Data.Functor.Identity upds :: (Monad m) => [String -> Options -> m Options] upds = [ \a o -> return o { flags = (flags o) { f1 = splitComma a ++ " " ++ f1 (flags o) } } ] setAll :: Options -> Options setAll _ = (getOpt upds :: Identity ()) `seq` undefined
ezyang/ghc
testsuite/tests/perf/compiler/T9233.hs
bsd-3-clause
303
0
15
68
138
76
62
8
1
module Data.Expenses.Ledger.AccountSuggestions ( SuggestionResult(..) , suggestions ) where import qualified Data.List as L import qualified Data.List.NonEmpty as NE import qualified Data.TagFrequencies as TF import Data.Expenses.Types ( SimpleTrans...
rgoulter/expenses-csv-utils
src/Data/Expenses/Ledger/AccountSuggestions.hs
mit
1,220
0
15
288
306
165
141
28
4
{-# LANGUAGE Arrows #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE UnicodeSyntax #-} module Parse where import Prelude hiding (words) import Data.Char (isSpace, toLower) import Text.XML.HXT.Core -- | These are the possible parts-of-speech described in the -- | METU-Sabanci ...
ayberkt/LING490-final-project
create/Parse.hs
mit
2,403
1
13
901
651
349
302
60
14
-- just invert concat with larger first and smaller later rqsort [] = [] rqsort (x:xs) = rqsort larger ++ [x] ++ rqsort smaller where smaller = [n | n <- xs, n <= x] larger = [n | n <- xs, n > x] -- main = do -- putStrLn . show $ rqsort [4,1,2,3]
fabioyamate/programming-in-haskell
ch01/ex4.hs
mit
265
0
9
74
98
52
46
4
1
{-# LANGUAGE StandaloneDeriving, FlexibleContexts, DeriveDataTypeable #-} module Main (main) where import Control.Monad.IO.Class import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.Char import Data.Dynamic import Data.List import Data.Map (Map) import qualified Data.Map as Map import...
IreneKnapp/direct-crypto-socket
Shell.hs
mit
6,847
0
23
2,698
1,691
874
817
166
9
module Main where import Latex import TP import System.Environment import Parsers import DataTypes import Data.List main = do (lexFile : sentence : _) <- args lexContents <- readFile lexFile (Right lex) <- return $ parseLexicon lexContents sequent <- return $ parseSequent sentence lex ps <- return $ evaluateStat...
gianlucagiorgolo/lambek-monad
LatexMain.hs
mit
1,945
0
16
476
778
381
397
48
4
module Handler.Upload where import Assets (getAllExams) import Data.Conduit.Binary import Data.ByteString.Lazy.Internal as LB import qualified Data.Text.Lazy.Encoding as LT import Import import Widgets (titleWidget, iconWidget, publicExamWidget, privateExamWidget, postWidget) import XMLParsing -- | Upload f...
cirquit/quizlearner
quizlearner/Handler/Upload.hs
mit
3,547
0
23
1,290
663
338
325
-1
-1
{-# LANGUAGE NumericUnderscores #-} {-# LANGUAGE ScopedTypeVariables #-} module Main ( main ) where import Control.Concurrent import Control.Concurrent.Async import Control.Monad import Data.IORef import Reactive.Banana.Combinators import Reactive.Banana.Frameworks import System.Random.TF import System.Random.TF....
Javran/misc
reactive-banana-playground/random-walk/src/Main.hs
mit
2,235
0
21
594
729
378
351
54
3
{- Homophone - Discover related artists Copyright (C) 2020 Michael Dippery <michael@monkey-robot.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at yo...
mdippery/homophone
src/Data/String/Homophone.hs
mit
1,752
0
7
295
139
87
52
16
1
{- HAAP: Haskell Automated Assessment Platform This module provides the @GHC@ plugin runs the _ghc_ Haskell compiler. -} {-# LANGUAGE EmptyDataDecls, TypeOperators, OverloadedStrings, GeneralizedNewtypeDeriving, TypeFamilies, UndecidableInstances, FlexibleContexts, MultiParamTypeClasses, FlexibleInstances #-} modu...
hpacheco/HAAP
src/HAAP/Compiler/GHC.hs
mit
3,140
0
14
683
1,026
535
491
-1
-1
module Divan.Vezin where import Data.Char (isSpace) import qualified Data.Text as T import Guguk.Syllabification import Guguk.TurkishAlphabet type Sentence = T.Text data SyllableType = Open | Closed deriving (Show, Eq) -- | The syllable type x symbolizes -- (. for Open, - for Close...
joom/Divan.hs
src/Divan/Vezin.hs
mit
1,991
0
12
398
483
266
217
33
1
module Json ( JsonPair, JsonValue(..), JsonString, JsonObject, JsonArray, parseJsonFile, bracketContent, valueToText ) where import System.IO import Control.Applicative import Control.Exception import Data.Either import Message -- JSONデータ type JsonPair = (String, JsonValue) type JsonBool = Bool type ...
yobiya/jcc
json.hs
mit
8,821
0
14
2,214
2,226
1,145
1,081
109
2
{-# LANGUAGE OverloadedStrings, DeriveDataTypeable, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleInstances, TypeFamilies #-} module Development.Shake.Gitlib ( defaultRuleGitLib , getGitReference , getGitContents , doesGitFileExist , readGitFile , isGitAncestor , getGitMergeBase...
nomeata/gipeda
src/Development/Shake/Gitlib.hs
mit
6,146
0
15
1,135
1,700
863
837
114
2
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-secretsmanager-rotationschedule-rotationrules.html module Stratosphere.ResourceProperties.SecretsManagerRotat...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/SecretsManagerRotationScheduleRotationRules.hs
mit
1,939
0
12
159
175
102
73
22
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ecs-taskdefinition-tmpfs.html module Stratosphere.ResourceProperties.ECSTaskDefinitionTmpfs where import Str...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ECSTaskDefinitionTmpfs.hs
mit
2,405
0
12
253
355
202
153
32
1
module MorseCode where {- Based on the following resources: International Morse Code, Hand Sending https://www.youtube.com/watch?v=R-petiNdCIY Technique Of Hand Sending (1944) https://www.youtube.com/watch?v=nVkLr0GyJPI (2:55 showing spacing) -} import Data.List (intersperse) import Data.Char (toUpper) data Elemen...
AaronShiny/MorseCode
MorseCode.hs
gpl-2.0
3,873
0
10
890
1,405
775
630
91
1
module Text.Shaun.Lexer ( makeLexer , Token(..) , Atom(..) ) where import Text.Shaun.Types import Text.Parsec import Text.Parsec.Char import Text.Parsec.ByteString import Data.ByteString (ByteString(..)) import Prelude hiding (readFile) import Control.Monad.Catch (throwM) -- | The output data structure of ...
Shumush/SNIHs
src/Text/Shaun/Lexer.hs
gpl-3.0
4,795
56
18
1,870
1,484
771
713
116
12
data Affine i = Affine !i !i (*:) :: Num i => Affine i -> Affine -> Affine i (*:) (Affine a b) (Affine c d) = Affine (a * c) (a * d + b) ($:) :: Num i => Affine i -> i -> i ($:) (Affine a b) x = a * x + b instance Num a => Monoid (Affine a) where mappend = flip (*:) mempty = Affine 1 0 f_st :: Int -> Int f_s...
kkmonlee/Project-Euler-Solutions
Haskell/p468.hs
gpl-3.0
1,178
3
23
491
636
315
321
-1
-1
{-# LANGUAGE OverloadedStrings #-} import Config import Systemd import Network.Gopher import Network.Gopher.Log import Network.Gopher.Util (santinizePath, uEncode) import Network.Gopher.Util.Gophermap import Data.ByteString (ByteString ()) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as ...
lukasepple/spacecookie
server/Main.hs
gpl-3.0
5,024
10
22
1,109
1,418
725
693
111
5
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-iam/gen/Network/Google/Resource/IAM/Projects/Roles/Undelete.hs
mpl-2.0
6,115
5
17
1,242
793
471
322
112
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-ml/gen/Network/Google/Resource/Ml/Projects/Operations/List.hs
mpl-2.0
7,028
0
19
1,604
976
570
406
135
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-} module MT.State ( StateT(..), MonadState(..) ) where import Prelude (($), (.)) import Functor import Applicative import Monad import MonadZero import MT.Class newtype...
seckcoder/lang-learn
haskell/lambda-calculus/src/MT/State.hs
unlicense
1,647
0
12
522
537
298
239
30
0
module P9 where pack :: (Eq a) => [a] -> [[a]] pack [] = [] pack (x:[]) = [[x]] pack (x:xs) = let rec = pack xs in if x == (head (head rec)) then [[x] ++ head rec] ++ tail rec else [[x]] ++ rec
plilja/h99
p9.hs
apache-2.0
213
0
12
65
149
81
68
7
2
module Kernel.GPU.GatherGrid ( prepare , createGrid , grid , degrid ) where import Data.Word import Foreign.C import Foreign.Ptr import Foreign.Marshal.Array ( advancePtr, withArray ) import Foreign.Storable ( peek, sizeOf ) import Kernel.GPU.Common import Data import Vector import qualified Kernel.GPU.Nvi...
SKA-ScienceDataProcessor/RC
MS4/dna-programs/Kernel/GPU/GatherGrid.hs
apache-2.0
4,372
53
16
1,188
1,238
640
598
96
2
{-# LANGUAGE OverloadedStrings, RecordWildCards #-} module Bonus where import Text.Parsec.Char (char, space, satisfy) import Text.Parsec.Combinator (sepBy, option, many1) import Text.Parsec.Prim (many, try) import ClassyPrelude hiding (try) import Restrictions (RestrictionTag, parseAdditionalRestrictions) import JEP...
gamelost/pcgen-rules
src/Bonus.hs
apache-2.0
46,971
5
93
14,794
8,667
4,558
4,109
842
2
{-# OPTIONS -fglasgow-exts -#include "../include/gui/qtc_hs_QSortFilterProxyModel_h.h" #-} ----------------------------------------------------------------------------- {-| Module : QSortFilterProxyModel_h.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-0...
uduki/hsQt
Qtc/Gui/QSortFilterProxyModel_h.hs
bsd-2-clause
112,920
0
19
24,537
34,178
16,340
17,838
-1
-1
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings, Rank2Types, TupleSections, ViewPatterns, TemplateHaskell, RecordWildCards #-} module Hc2Prosody.History (historyImporter) where import BasicPrelude hiding (map, mapM, take) import Control.Category (Category) import Control.Concurrent.MVar import Control.Lens hiding ((...
lshift/hc2prosody
src/Hc2Prosody/History.hs
bsd-2-clause
5,867
0
22
1,635
1,464
796
668
97
3
-------------------------------------------------------------------------------- -- | -- Module : Sound.ALUT -- Copyright : (c) Sven Panne 2005-2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable -- -- A Haskell binding for the O...
SwiftsNamesake/ALUT
src/Sound/ALUT.hs
bsd-3-clause
1,041
0
5
146
88
65
23
11
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} module PeerReview.Web.ServerSpec ( main , spec ) where import Control.Monad (void) import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai...
keveri/peer-review-service
test/PeerReview/Web/ServerSpec.hs
bsd-3-clause
4,581
0
17
1,478
868
439
429
88
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE OverloadedStrings #-} module Playlistach.Vk (login, searchTracks, getStreamUrl) where import Data.Coerce import Data.Aeson import Data.Vector as V (tail) import ...
aemxdp/playlistach
backend/Playlistach/Vk.hs
bsd-3-clause
2,379
0
14
697
678
364
314
58
2
{-# LANGUAGE BangPatterns, DataKinds, FlexibleContexts, TemplateHaskell #-} import Criterion.Main import qualified Data.Foldable as F import Data.Functor.Identity import Frames import qualified Pipes as P import qualified Pipes.Prelude as P tableTypes "Ins" "data/FL2.csv" type T...
codygman/Frames
benchmarks/InsuranceBench.hs
bsd-3-clause
3,011
3
15
1,000
992
505
487
65
1
module Main where import Control.Applicative import Data.Byteable (toBytes) import Crypto.Hash import Test.Hspec import Network.Wai import Network.Wai.Test (setPath) import qualified Network.HTTP.Types as H import qualified Data.ByteString as BS import qualified Data.Sequence as S import Network.Wai.Auth.HMAC import ...
raptros/wai-hmac-auth
tests/tests.hs
bsd-3-clause
13,354
0
23
3,422
3,481
1,691
1,790
213
2
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Test.Mafia.Hoogle where import Mafia.Hoogle import Mafia.Package import Mafia.P import Test.QuickCheck import ...
ambiata/mafia
test/Test/Mafia/Hoogle.hs
bsd-3-clause
686
0
12
148
196
112
84
17
1
{-# LANGUAGE MultiParamTypeClasses #-} module Physics.Falling2d.Rectangle ( Rectangle(..) , rectangleVolume , rectangleInertiaTensor ) where import Data.Vect.Double.Base import Physics.Falling.Shape.ImplicitShape import Physics.Falling2d.InertiaTensor2d data Rectangle = Rectangle Double Double deriv...
sebcrozet/falling2d
Physics/Falling2d/Rectangle.hs
bsd-3-clause
719
0
9
118
217
119
98
17
1
import Data.Gogol.DatastoreEntityTests import Test.Tasty (TestTree, defaultMain, testGroup) main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "Root" [ datastoreEntityTests ...
jamesthompson/nosql-generic
test/Main.hs
bsd-3-clause
329
1
6
155
68
34
34
8
1
-- 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 OverloadedStrings #-} {-# LANGUAGE NoRebindableSyntax #-} module Duckling.Nu...
facebookincubator/duckling
Duckling/Numeral/PT/Rules.hs
bsd-3-clause
10,483
0
18
2,909
3,163
1,783
1,380
309
11
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, ScopedTypeVariables, InstanceSigs #-} module Platform.Minimal32 where import Spec.Machine import Spec.Decode import Utility.Utility import Spec.CSRFile import qualified Spec.CSRField as Field import qualified Spec.Memory as M import Utility.MapMemory import Data.Bi...
mit-plv/riscv-semantics
src/Platform/Minimal32.hs
bsd-3-clause
5,479
3
18
1,230
2,031
1,091
940
91
1
import Control.Applicative import Control.Concurrent.MVar import Control.Exception import Control.Monad import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import Data.ByteString.Lazy.Builder import Data.List import Data.Monoid import Data.Word import System.IO.Unsafe import Test.Hspec...
qnikst/strictput
test/Main.hs
bsd-3-clause
3,371
10
14
703
1,174
604
570
68
1
module PrimRoom ( makePrimRoom ) where import System.Random import Linear.Affine import Linear.V2 import Linear.Vector import Type (Rect (..)) import RandNum (normRandom) import Conf type RandFunc g = g -> (Double, g) -- Make Room makePrimRoom :: RandomGen g => Conf -> g -> (Rect Double, g) makePrimRo...
masatoko/masonry
src/PrimRoom.hs
bsd-3-clause
1,321
0
12
349
584
312
272
32
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} -- | -- Module : Database.Monarch.Mock.Types -- Copyright : 2013 Noriyuki OHKAWA -- License : BSD3 -- -- Maintainer : n.oh...
notogawa/monarch
src/Database/Monarch/Mock/Types.hs
bsd-3-clause
2,357
0
19
518
568
323
245
49
1
{-# LANGUAGE TypeOperators #-} module Main where import Data.OI hiding (isEOF) import Data.Maybe import System.IO import qualified System.Environment as Sys (getArgs) main :: IO () main = runInteraction pmain pmain :: ([String], Either [(Maybe Char, Maybe ())] ([Maybe Char], [Maybe ()])) :-> () pmain = null . get...
nobsun/oi
sample/echo.hs
bsd-3-clause
1,317
0
11
269
607
321
286
-1
-1
{-# LANGUAGE OverloadedStrings, CPP #-} module Cauterize.Dynamic.Pretty ( dynamicPretty ) where #if __GLASGOW_HASKELL__ >= 710 import Prelude hiding ((<$>)) #endif import Cauterize.CommonTypes import Cauterize.Dynamic.Types as DT import Cauterize.Specification import Data.Maybe import Text.PrettyPrint.Leijen.Text...
cauterize-tools/cauterize
src/Cauterize/Dynamic/Pretty.hs
bsd-3-clause
3,867
0
13
989
1,459
759
700
77
11
module Language.CADT.Compile where import Language.CADT.Parse hiding (braces) import Data.List import Text.PrettyPrint.Leijen import Text.ParserCombinators.Parsec instance Pretty Field where pretty (Field n t) = text t <+> text n <> semi instance Pretty Constructor where pretty (Constructor n fs) = text ...
jonsterling/CADT
src/Language/CADT/Compile.hs
bsd-3-clause
2,774
0
18
812
971
493
478
59
1
{-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} module PostgREST.Error ( apiRequestError , pgError , simpleError , singularityError , binaryFieldError , connectionLostError , encodeError , gucHeadersError ) where import Protolude import ...
ruslantalpa/postgrest
src/PostgREST/Error.hs
mit
7,476
0
13
1,648
2,205
1,172
1,033
165
29
module Lang.Name ( Letter(getLetter) , unsafeMkLetter , Name(..) , unsafeMkName ) where import Prelude (Show (..)) import Universum import Data.Char (isAlpha) import Data.Coerce (coerce) import qualified Data.List.NonEmpty as NonEmpty import ...
input-output-hk/pos-haskell-prototype
auxx/src/Lang/Name.hs
mit
1,619
0
11
407
445
254
191
41
1
module Main where import Metafun.Compiler import Metafun.Compiler.State (runCompiler) import Language.Kiff.Parser import Language.Kiff.Typing.Infer import Language.Kiff.Typing.Errors import Language.CxxMPL.Unparser import System.Path (splitExt) import Text.PrettyPrint (render) import System.Environment (getArgs,...
gergoerdi/metafun
src/Metafun.hs
gpl-3.0
1,619
0
20
584
414
207
207
34
3
{-| Options common to most hledger reports. -} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #...
simonmichael/hledger
hledger-lib/Hledger/Reports/ReportOptions.hs
gpl-3.0
38,990
0
16
9,529
7,003
3,790
3,213
554
8
{-# 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 #-} -- ...
fmapfmapfmap/amazonka
amazonka-ses/gen/Network/AWS/SES/VerifyEmailAddress.hs
mpl-2.0
3,497
0
9
670
373
232
141
52
1
module Number.F2m (tests) where import Imports hiding ((.&.)) import Data.Bits import Data.Maybe import Crypto.Number.Basic (log2) import Crypto.Number.F2m addTests = testGroup "addF2m" [ testProperty "commutative" $ \a b -> a `addF2m` b == b `addF2m` a , testProperty "associative" $ \a b c ->...
vincenthz/cryptonite
tests/Number/F2m.hs
bsd-3-clause
4,557
0
16
1,386
1,774
913
861
90
1
module Dotnet.System.Collections.ICollection where import Dotnet import qualified Dotnet.System.Object import qualified Dotnet.System.Array data ICollection_ a type ICollection a = Dotnet.System.Object.Object (ICollection_ a) foreign import dotnet "method System.Collections.ICollection.get_IsSynchronized" get_Is...
FranklinChen/Hugs
dotnet/lib/Dotnet/System/Collections/ICollection.hs
bsd-3-clause
786
0
11
99
173
98
75
-1
-1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[PrimOp]{Primitive operations (machine-level)} -} {-# LANGUAGE CPP #-} -- The default is a bit too low for the quite large primOpInfo definition #if __GLASGOW_HASKELL__ >= 801 {-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-} #endif module Pri...
sgillespie/ghc
compiler/prelude/PrimOp.hs
bsd-3-clause
23,322
0
11
6,278
1,540
849
691
-1
-1
----------------------------------------------------------------------------- -- | -- Module : Plugins.Monitors.Mem -- Copyright : (c) Andrea Rossato -- License : BSD-style (see LICENSE) -- -- Maintainer : Jose A. Ortega Ruiz <jao@gnu.org> -- Stability : unstable -- Portability : unportable -- -- A ...
dsalisbury/xmobar
src/Plugins/Monitors/Mem.hs
bsd-3-clause
3,390
0
18
760
1,041
573
468
67
2
{-# LANGUAGE TypeFamilies #-} module ATLoop_help where import Data.Kind (Type) class Foo a where data FooT a :: Type int :: FooT a -> Int instance Foo Int where data FooT Int = FooInt !Int int (FooInt n) = n
sdiehl/ghc
testsuite/tests/indexed-types/should_compile/ATLoop_help.hs
bsd-3-clause
225
0
8
57
79
42
37
-1
-1
-- -- Copyright (c) 2014 Joachim Breitner -- module CallArity ( callArityAnalProgram , callArityRHS -- for testing ) where import VarSet import VarEnv import DynFlags ( DynFlags ) import BasicTypes import CoreSyn import Id import CoreArity ( typeArity ) import CoreUtils ( exprIsHNF, exprIsTrivial ) --imp...
mcschroeder/ghc
compiler/simplCore/CallArity.hs
bsd-3-clause
28,591
0
17
6,934
3,273
1,784
1,489
209
2
{-# LANGUAGE TypeFamilies #-} module Simple15 where (<$) :: p -> (p -> q) -> q x <$ f = f x type family Def p def :: Def p -> p def = undefined data EQU a b = EQU equ_refl :: EQU a a equ_refl = EQU data FOO = FOO type instance Def FOO = EQU () () foo :: FOO foo = equ_refl Simple15.<$ def -- This works: -- foo =...
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/indexed-types/should_compile/Simple15.hs
bsd-3-clause
337
0
8
87
132
75
57
14
1
import Drawing import Geometry main = drawPicture myPicture myPicture points = drawPoints [a,b,c,d] & drawLabels [a,b,c,d] ["A","B","C","D"] & drawSegment (a,b) & drawSegment (b,c) & drawSegment (c,a) & drawSegment (a,d) & drawSegment (b,d) where [a,b] = take 2 points [c,d] ...
alphalambda/k12math
contrib/MHills/GeometryLessons/code/teacher/key_lesson7b.hs
mit
348
0
12
88
184
103
81
13
1
{- | Facelet representation Facelets faces are unfolded and laid out like this: @ U L F R B D @ Faces (or colors) are ordered @U, L, F, R, B, D@. A Rubik's cube is a permutation of facelets numbered as follows: > 0 1 2 > 3 4 5 > 6 ...
Lysxia/twentyseven
src/Rubik/Cube/Facelet.hs
mit
1,633
0
4
498
162
115
47
26
0
-- | Module for recommending a data structure based on operations used module Recommend (printRecommendationFromAnalysis, recommendAllDs, recommendDS) where import Defs.Structures import AllStructures import Analyzer import Defs.Util import Defs.Common import Data.List import System.Random -- | Recommends a data st...
alistra/data-structure-inferrer
Recommend.hs
mit
2,064
0
15
407
559
280
279
36
2
module KeyGenerarionMappings () where
tombusby/haskell-des
keyschedule/KeyGenerarionMappings.hs
mit
38
0
3
4
7
5
2
1
0
-- -- Skeleton for Salsa interpreter -- To be used at the exam for Advanced Programming, B1-2013 -- module SalsaInterp (Position, interpolate, runProg) where import SalsaAst import Gpx import Data.List(intersect, union, (\\)) import qualified Data.Map as M type Position = (Integer, Integer) -- -- Primary top-level...
borgsmidt/adv-prog-2013
src/salsa/SalsaInterp.hs
mit
18,160
0
15
4,256
4,950
2,617
2,333
262
3
data Maybe' a = Nothing' | Just' a instance Monad Maybe' where return = Just' Nothing' >>= f = Nothing' (Just' x) >>= f = f x
calvinchengx/learnhaskell
monads/monad5.hs
mit
140
0
8
41
58
29
29
5
0
{-# LANGUAGE QuasiQuotes#-} {-# LANGUAGE OverloadedStrings #-} import Text.Hamlet (HtmlUrl, hamlet) import Text.Blaze.Html.Renderer.String (renderHtml) import Data.Text (Text, append, pack) import Control.Arrow (second) import Network.HTTP.Types (renderQueryText) import Data.Text.Encoding (decodeUtf8) import Blaze.Byte...
brodyberg/LearnHaskell
Web/sqlitetest/Shakespearean3.hs
mit
837
0
13
132
207
120
87
18
1
-- ------------------------------------------------------ -- -- Copyright © 2014 AlephCloud Systems, Inc. -- ------------------------------------------------------ -- {-# LANGUAGE UnicodeSyntax #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE CPP...
alephcloud/bayhac2014
src/Server.hs
mit
1,072
0
12
215
250
132
118
26
1
{-# LANGUAGE FlexibleInstances #-} module Spear.GL ( -- * Programs GLSLProgram , newProgram , linkProgram , useProgram , unuseProgram , withGLSLProgram -- ** Locations , attribLocation , fragLocation , uniformLocation -- ** Uniforms , Uniform(..) -- * Shaders , G...
jeannekamikaze/Spear
Spear/GL.hs
mit
23,654
0
19
6,913
5,744
2,935
2,809
502
3
fib 0 = 0 fib 1 = 1 fib n = fib(n - 1) + fib(n - 2) main = do print $ fib 4
mino2357/Hello_Haskell
src/haskell015.hs
mit
81
0
8
30
64
31
33
5
1
module Rebase.GHC.IO.IOMode ( module GHC.IO.IOMode ) where import GHC.IO.IOMode
nikita-volkov/rebase
library/Rebase/GHC/IO/IOMode.hs
mit
83
0
5
12
23
16
7
4
0
module Main (main) where import Data.Advent.Day05 main :: IO () main = do doorID <- head . words <$> readFile "input/day05.txt" putStr "Part One: " putStrLn (partOne doorID) putStr "Part Two: " putStrLn (partTwo doorID)
yurrriq/advent-of-idris
src/Data/Advent/Day05/Main.hs
mit
272
0
9
87
84
40
44
8
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} module Graphics.Rendering.WebGL.Types where import GHCJS.Types import Control.Monad.IO.Class import Foreign.C.Types import Data.Int import Data.Word import GHCJS.DOM.Types import GHCJS.TypedArray import Graphics.Rendering.WebGL.Matrix newtype Color = Col...
isomorphism/webgl
src/Graphics/Rendering/WebGL/Types.hs
mit
2,783
0
11
481
624
364
260
-1
-1
module GHCJS.DOM.AnimationEvent ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/AnimationEvent.hs
mit
44
0
3
7
10
7
3
1
0
comprehension1 = [x*2 | x <- [1..10]] -- predicates are separated by a comma predicate1 = [x*2 | x <- [1..10], x*2 >=12] predicate2 = [ x | x <- [50..100], mod x 7 == 3] boomBangs xs = [ if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x] --multople predicates predicate3 = [ x | x <- [10..20], x /= 13, x /= 15, x ...
luisgepeto/HaskellLearning
02 Starting Out/05_list_comprehension.hs
mit
815
2
8
178
451
256
195
12
2
import Control.Parallel.FT_1d.Execute main :: IO () main = executeCLMain
cosmo0920/Haskell-OpenCL
ft_1d.hs
mit
74
0
6
10
23
13
10
3
1
module Main where import Control.Concurrent.Async import Control.Monad.State import Soundwave.Server import qualified Soundwave.Logger as L main :: IO () main = do putStrLn "[][][] ... [][][]" let callbackfuncs = [parser, router, snapshotter, responder, replicator] l <- liftIO $ L.start let s1 = runServ...
mrb/soundwave
Main.hs
mit
668
0
12
104
237
130
107
15
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} module Control.Biegunka.Interpreter ( Interpreter(..) , optimistically , pause , confirm , changes ) where import Control.Lens import Control.Exception (catchJust) import Control.Monad (guard) import Data.Ch...
biegunka/biegunka
src/Control/Biegunka/Interpreter.hs
mit
4,362
0
20
1,143
1,325
733
592
96
4
module CsvParser where import Data.Csv import qualified Data.ByteString.Lazy as BS import qualified Data.Vector as V import Data.Char import Args parseCsv :: ProgramOptions -> IO (Either String [[Double]]) parseCsv options = do csvData <- BS.readFile $ inputPath options case decodeWith decodeOptions ignoreHe...
xixi4Den/BSUIR-Haskell-lw1
src/CsvParser.hs
mit
1,411
0
19
334
492
254
238
29
3
module Main where import Test.Hspec import Text.ParserCombinators.Parsec.Pos import Turnip.AST import TestUtil -- helper for string literals, assumes 1-liners pos :: Column -> SourcePos pos = newPos "" 1 spec :: Spec spec = do describe "Parser.parseLua" $ do describe "literals" $ do it "sho...
bananu7/Turnip
Test/TestParser.hs
mit
12,203
0
29
4,353
3,947
1,957
1,990
178
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dlm-lifecyclepolicy.html module Stratosphere.Resources.DLMLifecyclePolicy where import Stratosphere.ResourceIm...
frontrowed/stratosphere
library-gen/Stratosphere/Resources/DLMLifecyclePolicy.hs
mit
3,034
0
14
345
454
260
194
40
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TupleSections #-} -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb-AppCookieStickinessPolicy.html module Stratosphere.ResourceProperties.ElasticLoadBalancingLoadBalance...
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ElasticLoadBalancingLoadBalancerAppCookieStickinessPolicy.hs
mit
2,880
0
13
223
268
154
114
29
1
{-# LANGUAGE OverloadedStrings #-} module Markdown ( generate ) where import Data.Maybe (fromMaybe) import qualified Data.Text as T import Types import Highlight (getLang) generate :: Maybe String -> String -> [Chunk] -> T.Text generate maybeLang name chunks = let lang = fromMaybe (getLang name) maybeL...
tcrs/lit
src/Markdown.hs
gpl-2.0
1,039
0
16
316
338
176
162
30
2
{- Copyright (C) 2013-2014 John MacFarlane <jgm@berkeley.edu> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is ...
nickbart1980/pandoc
src/Text/Pandoc/Asciify.hs
gpl-2.0
7,636
0
8
1,409
2,382
1,574
808
388
1
module Setup (main) where import Distribution.Simple (defaultMain) main :: IO () main = defaultMain
taktoa/TSLogAnalyzer
Setup.hs
gpl-3.0
112
0
6
26
34
20
14
4
1
module FQuoter.Templating.DisplaySpec (main, spec) where import Text.ParserCombinators.Parsec.Error import qualified Data.Map as Map import Test.Hspec import FQuoter.Quote import FQuoter.Templating.Display import FQuoter.Templating.TemplateTypes main :: IO() main = hspec spec defaultTree = [SomeAuthors All ...
Raveline/FQuoter
testsuite/FQuoter/Templating/DisplaySpec.hs
gpl-3.0
3,174
0
14
926
821
428
393
55
1
module TestLog where import qualified System.Log as Log import Test.HUnit as HUnit test_logger :: HUnit.Test test_logger = "logger" ~: HUnit.TestCase $ do logger <- Log.createLogger (Just "./test.log") 1000000 9 loop 1000 logger Log.stopLogger logger where loop :: Int -> Log.Logger -> IO () ...
abayley/netpoll
test/TestLog.hs
gpl-3.0
738
0
12
196
247
123
124
21
2
module Moonbase.DBusSpec where import Test.Hspec import Test.Fake import Moonbase.DBus spec :: Spec spec = describe "Moonbase.DBus" $ it "all" $ pending
felixsch/moonbase
test/Moonbase/DBusSpec.hs
gpl-3.0
192
0
7
60
45
25
20
8
1