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 RankNTypes #-} {-# LANGUAGE RecursiveDo #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-} module Reflex.Cocos2d.Internal ( SpiderNodeBuilder , mainScene ) where import Data.Coerce import Data.Seque...
lynnard/reflex-cocos2d
src/Reflex/Cocos2d/Internal.hs
mit
8,084
0
24
1,952
1,746
924
822
104
1
doubleMe x = x + x {- doubleUs x y = x * 2 + y * 2 -} doubleUs x y = doubleMe x + doubleMe y doubleSmallNumber x = if x > 100 then x else x * 2 doubleSmallNumber' x = (if x > 100 then x else x * 2) + 1 {- zip [1..] (replicate 4 4) -} boomBangs xs = [if x < 10 then "BOOM!" else "BANG!" | x <- xs, odd x] removeNonUp...
yhoshino11/learning_haskell
baby.hs
mit
479
1
11
129
262
138
124
7
2
#!/usr/bin/env runhaskell {- Thanks to Gwern@gwern.net find . -name "*.md" -type f -print0 | xargs -0 runhaskell linkextract.hs >> ~/.urls -} import System.Environment (getArgs) import Text.Pandoc (Pandoc, Inline(Link), def, bottomUpM, readMarkdown) main :: IO () main = getArgs >>= mapM readFile >>= mapM_ analyzePag...
rejuvyesh/homepage
linkextract.hs
mit
583
0
12
111
186
94
92
9
1
{-# OPTIONS_GHC -fno-warn-orphans #-} module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Import import Settings import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers import Network.Wai.Middleware.RequestLogger import ...
mmoutenot/latitune-haskell
Application.hs
mit
2,709
0
12
535
463
251
212
-1
-1
module Execution where import Control.Concurrent.ParallelIO (parallel_) import System.Directory (doesDirectoryExist, doesFileExist) import System.Timeout (timeout) import Data.List (...
NorfairKing/eden
src/Execution.hs
gpl-2.0
5,739
0
21
1,845
1,760
889
871
127
4
{-# LANGUAGE TypeFamilies #-} data Z data S n = S {sArgument :: n} type family Plus a b type instance Plus Z a = a type instance Plus (S a) b = S (Plus a b) type ONE = S Z type TWO = Plus (S Z) (S Z) class NatInt a where natInt :: a -> Int instance NatInt Z where natInt = const 0 instance NatIn...
graninas/Haskell-Algorithms
Tests/Types/TypeCalculation.hs
gpl-3.0
375
2
8
109
180
93
87
-1
-1
-- Copyright (C) 2013 Che-Liang Chiou. module Telnet.Utils ( Telnet.Internal.Utils.update, edge, sequenceNvt, ) where import Data.Map (toList) import Telnet import Telnet.Internal.Utils edge :: NvtOpt -> NvtOpt -> NvtOpt edge (NvtOptBool p) opt@(NvtOptBool q) | p /= q = opt edge (NvtOptPair p) o...
clchiou/gwab
lib/Telnet/Utils.hs
gpl-3.0
640
0
9
166
250
130
120
15
1
{-# LANGUAGE LambdaCase, ViewPatterns #-} -- Library for Aura output in different languages. -- All normal restrictions on line length do not apply for this file, and this file only. {- AURA TRANSLATORS - Thank you all Chris "Kwpolska" Warrick | Polish Denis Kasak / "stranac" | Croatian Fredrik Hai...
joehillen/aura
src/Aura/Languages.hs
gpl-3.0
103,717
0
14
22,203
14,116
7,473
6,643
1,500
27
{- as3tohaxe - An Actionscript 3 to haXe source file translator Copyright (C) 2008 Don-Duong Quach 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,...
geekrelief/as3tohaxe
Lexitall.hs
gpl-3.0
3,480
0
17
1,041
852
426
426
49
2
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-mirror/gen/Network/Google/Resource/Mirror/Contacts/Delete.hs
mpl-2.0
2,498
0
12
582
303
186
117
46
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Labels/Delete.hs
mpl-2.0
3,294
0
14
780
388
235
153
61
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DeleteGateway.hs
mpl-2.0
4,383
0
9
899
461
285
176
55
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Orders/GettestOrdertemplate.hs
mpl-2.0
6,182
0
19
1,430
880
510
370
131
1
{-# LANGUAGE OverloadedStrings #-} module View.Format ( htmlFormats ) where import Control.Monad (forM_) import Data.Function (on) import Data.List (groupBy, sortBy, intersperse) import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as HA import Has (view) import qualified Store.Conf...
databrary/databrary
src/View/Format.hs
agpl-3.0
1,526
0
25
394
539
279
260
35
1
module Git.Command.LsTree (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/LsTree.hs
unlicense
84
0
7
15
42
23
19
3
1
import Control.Monad.Trans.Cont square:: (Num a) => a -> a square x = x*x square_cps :: (Num a) => a -> (a -> b) -> b square_cps x k = k (square x) twice :: (a -> a) -> a -> a twice f x = f . f $ x twice_cps :: (a -> (a -> b) -> b) -> a -> (a -> b) -> b twice_cps f_cps x = \k -> f_cps x $ \y -> f_cps y...
seckcoder/lang-learn
haskell/cps.hs
unlicense
465
4
10
139
298
146
152
16
1
data Fiction = Fiction deriving Show data Nonfiction = Nonfiction deriving Show data BookType = FictionBook Fiction | NonfictionBook Nonfiction deriving Show type AuthorName = String data Author = Author (AuthorName, BookType) data GuessWhat = Chickenbutt deriving (Eq, Show) data Id ...
dmvianna/haskellbook
src/Ch11-OS-BinT.hs
unlicense
4,367
55
9
1,340
1,338
699
639
140
2
{-# LANGUAGE OverloadedStrings #-} module Network.Haskoin.Script.Units (tests) where import Data.ByteString (ByteString) import Data.Either (fromLeft, fromRight, isLeft, isRight) import Data.Maybe ...
plaprade/haskoin
haskoin-core/test/Network/Haskoin/Script/Units.hs
unlicense
6,899
0
14
1,069
895
501
394
95
1
import Data.List ans (a':b':c':_) = let a = drop 1 a' b = drop 1 b' c = drop 1 c' r = (c \\ a) `union` (b `intersect` c) in length r main = do _ <- getLine c <- getContents let i = map (map read) $ map words $ lines c :: [[Int]] o = ans i print o
a143753/AOJ
0318.hs
apache-2.0
292
1
14
107
173
85
88
13
1
{-# LANGUAGE TemplateHaskell, QuasiQuotes, OverloadedStrings #-} module Handler.Setting ( getSettingR, postSettingR ) where import Control.Applicative import Data.Maybe import Ywitter data SettingParams = SettingParams { uname :: String } settingParamsFormlet :: Maybe SettingParams -> Form s m SettingPara...
tanakh/Ywitter
Handler/Setting.hs
bsd-2-clause
1,230
0
12
234
289
147
142
28
2
{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-} module Context.Language where import Context.Types as C import Control.Monad.Trans import Data.Maybe import Data.Monoid import ID import My.Control.Monad import My.Control.Monad.State import My.Data.List import My.Prelude import PCode import Translate impor...
lih/Alpha
src/Context/Language.hs
bsd-2-clause
3,792
0
20
919
1,698
871
827
80
2
module Main where import System.Console.CmdArgs import HEP.Parser.StdHep.ProgType import HEP.Parser.StdHep.Command main :: IO () main = do putStrLn "HsStdHep" param <- cmdArgs mode commandLineProcess param
wavewave/HsStdHep
exe/hsstdhep.hs
bsd-2-clause
217
0
8
35
61
33
28
9
1
-- | -- Module : Text.Megaparsec.Lexer -- Copyright : © 2015 Megaparsec contributors -- © 2007 Paolo Martini -- © 1999–2001 Daan Leijen -- License : BSD3 -- -- Maintainer : Mark Karpov <markkarpov@opmbx.org> -- Stability : experimental -- Portability : non-portable (use...
tulcod/megaparsec
Text/Megaparsec/Lexer.hs
bsd-2-clause
19,307
0
15
5,192
3,263
1,828
1,435
-1
-1
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleContexts #-} import Plots import Plots.Axis.ColourBar import Plots.Axis import Diagrams.Prelude import Diagrams.Backend.Rasterific import Plots.Types.Heatmap import Plots.Types (Orientation (..), orient) myaxis :: Axis B V2 Double myaxis = r2Axis &~ do addPlotab...
bergey/plots
examples/heat.hs
bsd-3-clause
546
0
14
89
185
99
86
-1
-1
import Graphics.Rendering.Chart.Easy import Graphics.Rendering.Chart.Backend.Diagrams(toFile) import ActivationFunction import Numeric.LinearAlgebra.Data(vector, toList) main = toFile def "activation_function.svg" $ do layout_title .= "activation function" let input = vector [(-5),(-4.9)..5] plot (line "s...
ku00/deep-learning-practice
src/PlotActivationFunction.hs
bsd-3-clause
628
0
14
98
251
129
122
13
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.TextureObject -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portabilit...
haskell-opengl/OpenGLRaw
src/Graphics/GL/EXT/TextureObject.hs
bsd-3-clause
982
0
5
132
92
65
27
18
0
{-# LANGUAGE CPP #-} module Tcp where import Control.Monad import Data.Binary.Put import Data.Bits import qualified Data.ByteString.Lazy as B import Data.Word import Text.ParserCombinators.Parsec import Text.ParserCombinators.Parsec.Perm import Packet import Lexer import PseudoSum import Util #ifdef HRWS_TEST import...
karknu/rws
src/Tcp.hs
bsd-3-clause
5,464
0
30
1,465
1,859
946
913
99
2
{-# OPTIONS_HADDOCK hide #-} -------------------------------------------------------------------------------- -- | -- Module : Sound.ALUT.Errors -- Copyright : (c) Sven Panne 2005-2015 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portab...
SwiftsNamesake/ALUT
src/Sound/ALUT/Errors.hs
bsd-3-clause
1,828
0
15
255
372
205
167
25
1
{-# LANGUAGE ViewPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE OverloadedStrings #-} -- | Model for wiki. module HL.M.Wiki where import HL.C import Control.Exception.Lifted (catch) import Data.Conduit import Data.Maybe import Data.Monoid import Data.Text (unpack) import Network.HTTP.Conduit impor...
yogsototh/hl
src/HL/M/Wiki.hs
bsd-3-clause
1,932
0
18
492
516
269
247
53
2
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE TypeFamilies #-} module B.Question ( Question(..) , AQuestion(..) , questionEquals , testAnswer ) where import Control.Exception (SomeException) import Data.Binary (B...
strager/b
B/Question.hs
bsd-3-clause
1,263
0
12
261
423
221
202
37
2
module Test.Sloth.TestCase ( Mapping(..), mapping, TestCase(..), showTestCase, isFailure, isValid ) where import Control.Monad.Writer ( execWriter, Writer ) import Data.Monoid ( Sum(..) ) import Data.Data ( Data ) import Test.Sloth.CoMonad import Test.Sloth.PVal ( PVal, toPVal, showsPrecPValWithSub, isBotto...
plancalculus/sloth
Test/Sloth/TestCase.hs
bsd-3-clause
3,293
0
16
763
1,059
557
502
63
3
-- 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 OverloadedStrings #-} module Duckling.Time.EN.PH.Corpus ( allExamples ) where import Data.Strin...
facebookincubator/duckling
Duckling/Time/EN/PH/Corpus.hs
bsd-3-clause
3,303
0
10
1,179
869
524
345
65
1
{-# LANGUAGE OverloadedStrings #-} -- | Generates one Haskell module per class in the Smoke module. module Smoke.Gen ( GeneratorConfig(..), defaultGeneratorConfig, generateSmokeModule ) where import Control.Monad.Reader import Data.Map ( Map ) import qualified Data.Map as M import Data.Monoid import Data.Text ...
travitch/humidor
src/Smoke/Gen.hs
bsd-3-clause
10,980
0
21
2,419
1,848
991
857
129
3
-- Advent of Code ---- Day 1: Not quite Lisp module AOC2015.Day01 where checkparens :: Char -> Int checkparens c | c == '(' = 1 | c == ')' = -1 | otherwise = 0 findposition :: String -> Int -> Int findposition _ (-1) = 0 findposition pars pos = 1 + findposition (tail pars) (pos + checkparens (head pars)) answ...
bitrauser/aoc
src/AOC2015/Day01.hs
bsd-3-clause
662
0
11
142
227
108
119
18
1
{-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} #ifdef TRUSTWORTHY {-# LANGUAGE Trustworthy #-} #endif #if __GLASGOW_HASKELL__ >= 710 {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE ViewPatterns #-} #endif ------------------------------------------------------------------------------- -- | -- Module : Co...
ddssff/lens
src/Control/Lens/Empty.hs
bsd-3-clause
4,882
0
18
925
1,338
737
601
115
0
{-# LANGUAGE OverloadedStrings #-} import Control.Lens ((^.)) import Control.Monad (forM) import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.Char8 as C8 import Data.List (intercalate) import Network....
mitochon/hoosalind
src/problems/mprt.hs
mit
3,108
3
17
740
831
451
380
-1
-1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE OverloadedStrings #-} module Language.C.Inline.ParseSpe...
Teaspot-Studio/inline-c
test/Language/C/Inline/ParseSpec.hs
mit
4,579
0
16
1,106
1,218
669
549
95
4
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} module Haskell.Indexer.Plugin where import GhcPlugins hiding (($$)) import TcRnTypes import TcRnMonad import TcRnDriver import GhcMonad import Data.IORef import Language.Haskell.Indexer.Backend.Ghc import Language.Haskell.Indexer.Backend.GhcEnv import ...
robinp/haskell-indexer
haskell-indexer-plugin/src/Haskell/Indexer/Plugin.hs
apache-2.0
2,283
0
14
571
438
232
206
45
2
{-# LANGUAGE OverloadedStrings #-} import System.Environment import Control.Concurrent import Network.HTTP.Types import Network.Wai import Network.Wai.Handler.Warp import Network.Helics import Network.Helics.Wai import qualified Data.ByteString.Char8 as S8 main :: IO () main = do key:_ <- getArgs withHelics...
dzotokan/helics
helics-wai/example.hs
mit
961
0
14
190
348
182
166
21
4
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd"> <helpset version="2.0" xml:lang="fil-PH"> <title>ToDo-List</title> <maps> <homeID>todo</homeID> <mapref location="map.jh...
thc202/zap-extensions
addOns/todo/src/main/javahelp/help_fil_PH/helpset_fil_PH.hs
apache-2.0
956
77
67
155
408
207
201
-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="en-GB"> <title>Common Library</title> <maps> <homeID>commonlib</homeID> <ma...
kingthorin/zap-extensions
addOns/commonlib/src/main/javahelp/help/helpset.hs
apache-2.0
978
80
64
169
418
213
205
-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="en-GB"> <title>Browser View | ZAP Extension</title> <maps> <homeID>top</homeID> ...
0xkasun/security-tools
src/org/zaproxy/zap/extension/browserView/resources/help/helpset.hs
apache-2.0
986
81
64
172
424
216
208
-1
-1
module LocalSpecImp where import LocalSpec0 {-@ bar :: {x:Int | x > 99} -> {v:Int | v > 100 } @-} bar :: Int -> Int bar x = foo x
ssaavedra/liquidhaskell
tests/pos/LocalSpecImp.hs
bsd-3-clause
132
0
5
33
28
16
12
4
1
{-# LANGUAGE DataKinds, TypeOperators, TypeFamilies #-} module Main(main) where import GHC.TypeLits import Data.Proxy -------------------------------------------------------------------------------- -- Test top-reactions tsub :: Proxy (x + y) -> Proxy y -> Proxy x tsub _ _ = Proxy tsub2 :: Proxy (x + y) -> (Proxy x,...
ezyang/ghc
testsuite/tests/typecheck/should_run/TcTypeNatSimpleRun.hs
bsd-3-clause
1,293
0
13
403
627
325
302
29
1
{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds, PolyKinds #-} {-# LANGUAGE TypeOperators #-} module T15170 where import Data.Kind import Data.Proxy data TyFun :: Type -> Type -> Type type a ~> b = TyFun a b -> Type infixr 0 ~> type family Apply ...
sdiehl/ghc
testsuite/tests/polykinds/T15170.hs
bsd-3-clause
758
3
15
223
310
182
128
-1
-1
module AnnotatedExpr where import Control.Applicative (pure, (<$>)) import Control.Lens.Operators import Control.Monad.Trans.State (State, runState) import Utils import qualified Control.Lens as Lens import qualified Data.List as List import qualified Lamdu.Data.Expression.IRef as ExprIRef type AnnotationIndex = Int ...
schell/lamdu
test/AnnotatedExpr.hs
gpl-3.0
1,098
0
12
201
374
205
169
-1
-1
module T7906 where class Foo f where foo :: f {-# INLINABLE foo #-}
snoyberg/ghc
testsuite/tests/rename/should_fail/T7906.hs
bsd-3-clause
73
0
6
19
19
11
8
3
0
module A ( -- | bla bla {- | blabla -} ) where
ryantm/ghc
testsuite/tests/haddock/should_compile_noflag_haddock/haddockC019.hs
bsd-3-clause
50
0
3
16
9
7
2
1
0
#define T 123 int foo (void) { return 3; }
SanDisk-Open-Source/SSD_Dashboard
uefi/gcc/gcc-4.6.3/gcc/testsuite/gcc.dg/pch/save-temps-1.hs
gpl-2.0
46
2
6
13
24
11
13
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Validators.EmailValidator (isValid) where import qualified Text.Email.Validate as EV import qualified Models.Errors.Code as EC import Data.ByteString.Char8 (pack) isValid :: String -> Either [EC.Code] [EC.Code] isValid password | EV.isValid $ pack password = Right [] ...
bocuma/users-service
src/Validators/EmailValidator.hs
mit
362
0
9
58
110
62
48
9
1
module Main (main) where import AoC.Day11 (search, fullinput, fullinput2) main = print (search fullinput2)
rzeigler/advent-of-code-2016
Day/Day11.hs
mit
111
0
7
18
39
23
16
3
1
-- Sum of odd numbers -- http://www.codewars.com/kata/55fd2d567d94ac3bc9000064 module Codewars.SumOddNumbers where rowSumOddNumbers :: Integer -> Integer rowSumOddNumbers = (^3)
gafiatulin/codewars
src/7 kyu/SumOddNumbers.hs
mit
180
0
5
20
26
17
9
3
1
{-# LANGUAGE DuplicateRecordFields #-} module Physics.RigidBody ( gEarth, mkCuboidInertiaMatrix, mkCompositeCuboidInertiaMatrix, RigidBody(..), affineInverse, positionToLocalSpace, positionToWorldSpace, vectorToLocalSpace, vectorToWorldSpace, calculateDerivedData, integrate,...
Chatanga/kage
src/Physics/RigidBody.hs
mit
8,874
0
18
2,083
1,946
1,043
903
150
1
{-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TypeSynonymInstances #-} {-# OPTIONS_GHC -ddump-splices #-} {-# LANGUAGE TemplateHaskell #-} module Main where import Control.Lens import Control.Lens.TH import Control.Lens.Type import Control.Lens.Internal import Language.Haskell....
vacationlabs/record-splicer
test/Example.hs
mit
1,923
0
11
420
520
304
216
-1
-1
{-# OPTIONS_GHC -Wall #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE ExistentialQuantification #-} module Observable.Core ( module Data.Sampling.Types , ModelF(..) -- FIXME don't want to export ConditionF , Model , Conditioned , Node(..) , condition -- * smart constructors , beta , binomial ,...
jtobin/observable
Observable/Core.hs
mit
4,393
0
11
1,104
1,735
907
828
115
16
{-# htermination plusFM_C :: (b -> b -> b) -> FiniteMap Int b -> FiniteMap Int b -> FiniteMap Int b #-} import FiniteMap
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/FiniteMap_plusFM_C_5.hs
mit
121
0
3
24
5
3
2
1
0
{-# LANGUAGE TupleSections #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ViewPatterns #-} {-# LANGUAGE TypeFamilies...
fpco/stackage-curator
src/Stackage/CheckBuildPlan.hs
mit
8,445
0
20
3,028
1,957
1,011
946
-1
-1
{-# htermination quot :: Int -> Int -> Int #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_quot_1.hs
mit
47
0
2
10
3
2
1
1
0
module Test.Smoke.App.PrintTitle ( printTitle, ) where import Control.Monad.IO.Class (liftIO) import qualified Data.List as List import qualified Data.Maybe as Maybe import Test.Smoke import Test.Smoke.App.OptionTypes import Test.Smoke.App.Print printTitle :: ShowSuiteNames -> SuiteName -> Maybe TestName -> Outpu...
SamirTalwar/Smoke
src/app/Test/Smoke/App/PrintTitle.hs
mit
689
0
10
132
165
95
70
18
2
{-# LANGUAGE PackageImports #-} import "lambdar" Application (develMain) import Prelude (IO) main :: IO () main = develMain
builtinnya/lambdar-website
app/devel.hs
mit
125
0
6
19
34
20
14
5
1
-- @author Alexandre Lucchesi -- -- This module defines some handy functions. module NewTypes.Util where import FeatureModel.NewTypes.Types import Data.Tree -- Print tree node names. printFM :: FeatureModel a -> IO () printFM (FeatureModel tree _) = (putStrLn . drawTree . (fmap fName)) tree printWholeFM :: FeatureMo...
hephaestus-pl/hephaestus
alexandre/feature-modeling/src/FeatureModel/NewTypes/Util.hs
mit
1,246
0
10
204
189
98
91
15
1
{-# LANGUAGE DoAndIfThenElse #-} module Functions where import Control.Monad (liftM) import System.Directory (doesFileExist, getCurrentDirectory) import System.FilePath (makeRelative) import System.FilePath.Find (find, always, extension, (==?), (||?)) import System.Process (runProcess, waitForProcess) import System.I...
jonathanmcelroy/commandLineIDE
Functions.hs
mit
1,916
0
14
282
471
260
211
34
2
{-# LANGUAGE CPP #-} module GHCJS.DOM.VTTCue ( #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) module GHCJS.DOM.JSFFI.Generated.VTTCue #else #endif ) where #if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT) import GHCJS.DOM.JSFFI.Generated.VTTCue #e...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/VTTCue.hs
mit
331
0
5
33
33
26
7
4
0
{-| Copyright (c) 2014 Maciej Bendkowski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, me...
maciej-bendkowski/LCCLUtils
src/BCKWTranslatorTest.hs
mit
2,473
0
12
640
408
223
185
27
1
import qualified Data.Map as Map main = do str <- readFile "Problem0067.txt" print $ getProblem67Value str -- the problem is to find the hightest sum of any path through the given grid getProblem67Value :: String -> Integer getProblem67Value str = fst $ gridLookupMemo (getGridWithIndices grid) Map.empty w...
jchitel/ProjectEuler.hs
Problems/Problem0067.hs
mit
3,069
0
12
662
797
447
350
29
3
-- Copyright 2015 Mitchell Kember. Subject to the MIT License. -- Project Euler: Problem 19 -- Counting Sundays module Problem19 where import Common (divides) isLeap :: Int -> Bool isLeap y | divides 100 y = divides 400 y | otherwise = divides 4 y daysInMonth :: (Int, Int) -> Int daysInMonth (y, m) | is...
mk12/euler
haskell/Problem19.hs
mit
609
0
10
148
254
139
115
14
1
{- Copyright (C) 2006-8 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 dis...
kowey/pandoc-old
src/pandoc.hs
gpl-2.0
32,084
0
21
13,312
6,040
3,341
2,699
584
24
{-# OPTIONS -w -O0 #-} {- | Module : ATC/ExtSign.der.hs Description : generated Typeable, ShATermConvertible instances Copyright : (c) DFKI Bremen 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : provisional Portability : non-portable(overlapping Ty...
nevrenato/Hets_Fork
ATC/ExtSign.hs
gpl-2.0
1,696
0
16
332
324
175
149
28
1
{-# LANGUAGE ViewPatterns, MultiParamTypeClasses, FlexibleInstances, TypeSynonymInstances #-} module HSE.Match where import Data.Char import HSE.Type import HSE.Util import qualified Language.Haskell.Exts as HSE_ class View a b where view :: a -> b data App2 = NoApp2 | App2 Exp_ Exp_ Exp_ deriving Show insta...
alphaHeavy/hlint
src/HSE/Match.hs
gpl-2.0
4,226
0
12
1,128
1,777
870
907
106
1
{-| A 'Journal' is a set of 'Transaction's and related data, usually parsed from a hledger/ledger journal file or timelog. This is the primary hledger data object. -} module Hledger.Data.Journal where import Data.List import Data.Map (findWithDefault, (!)) import Data.Ord import Data.Time.Calendar import Data.Time.L...
trygvis/hledger
hledger-lib/Hledger/Data/Journal.hs
gpl-3.0
19,124
0
17
3,833
4,433
2,418
2,015
254
3
{-# language GeneralizedNewtypeDeriving #-} module S.DAG where import S.Type import qualified Data.GraphViz as V import qualified Data.GraphViz.Attributes.Complete as V import Data.GraphViz.Attributes.Colors.X11 import qualified Data.Map.Strict as M import qualified Data.Set as S import qualified Control.Monad.St...
jwaldmann/s
S/DAG.hs
gpl-3.0
3,988
6
24
1,525
1,567
793
774
115
3
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE RecordWildCards #-} import Control.Applicative ((<$>),(<*>),pure) import Control.Lens import Control.Monad import Control.Monad.Trans import Control.Monad.Trans.Eit...
wavewave/lhc-analysis-collection
analysis/findab.hs
gpl-3.0
7,225
0
25
2,687
1,349
733
616
100
2
module Life.Console ( play , showBoard ) where import Life import System.IO import Control.Monad (when) play :: Board -> IO () play b = do hSetBuffering stdin NoBuffering -- we want single key commands showBoard b 0 loop b 0 loop :: Board -> Int -> IO () loop b g = do ...
andrewsw/hLife
Life/Console.hs
gpl-3.0
1,464
0
16
559
504
246
258
-1
-1
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} module SugarScape.Agent.Interface ( AgentMSF , AgentT , AgentDef (..) , AgentOut (..) , observable , switchInteractionChannels , agentOut , agentOutMergeLeft , agentOutMergeRight , isDead , kill , newAgent ) where imp...
thalerjonathan/phd
public/towards/SugarScape/experimental/concurrent/src/SugarScape/Agent/Interface.hs
gpl-3.0
3,057
0
13
908
899
473
426
101
1
{-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} module Mescaline.Pattern.Base where import qualified Control.Applicative as A import qualified Control.Monad as M import Control.Monad.Reader.Class (MonadReader(..)) import Control.M...
kaoskorobase/mescaline
lib/mescaline-patterns/src/Mescaline/Pattern/Base.hs
gpl-3.0
12,398
0
15
4,036
6,774
3,436
3,338
321
8
{- Copyright (C) 2017-2018 defanor <defanor@uberspace.net> 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 later version. This program is dis...
defanor/pancake
Pancake.hs
gpl-3.0
16,250
125
30
4,892
5,168
2,658
2,510
379
21
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
dysinger/amazonka
amazonka-ecs/gen/Network/AWS/ECS/ListContainerInstances.hs
mpl-2.0
6,227
0
12
1,211
679
410
269
75
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} -- | -- Module : Network.Google.People -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Publi...
rueshyna/gogol
gogol-people/gen/Network/Google/People.hs
mpl-2.0
6,686
0
6
2,020
865
604
261
255
0
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-run/gen/Network/Google/Resource/Run/Projects/Authorizeddomains/List.hs
mpl-2.0
5,700
0
18
1,330
878
507
371
126
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/Returncarrier/Create.hs
mpl-2.0
5,522
0
19
1,283
808
469
339
118
1
{-# LANGUAGE DeriveGeneric, OverloadedStrings #-} module Blog.Models.Comment where import Control.Monad.IO.Class import Data.Aeson import qualified Data.ByteString as S import Data.Text (Text) import Data.Text.Encoding (decodeUtf8) import Data.Time.LocalTime import Data.Maybe import Data.Monoid import Database.Postgre...
alevy/mappend
src/Blog/Models/Comment.hs
agpl-3.0
2,970
0
18
770
757
407
350
72
2
-- | The Haskell Prelude exports a number of symbols that can easily -- collide with functions appearing in bindings. The generated code -- requires just a small subset of the functions in the Prelude, -- together with some of the functionality in Data.GI.Base, we -- reexport this explicitly here. module Data.GI.Base.S...
hamishmack/haskell-gi-base
src/Data/GI/Base/ShortPrelude.hs
lgpl-2.1
2,879
0
6
519
712
494
218
83
0
{-# OPTIONS_GHC -Wall -fno-warn-orphans #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE DeriveFunctor #-} module Qps.Lp ( Lp(..), FLp(..), ILp(..), Coef(..) ...
ghorn/dynobud
dynobud/tests/Qps/Lp.hs
lgpl-3.0
18,784
0
19
5,233
7,253
3,729
3,524
393
11
----------------------------------------------------------------------------- -- | -- Module : Data.List.LCS.HuntSzymanski -- Copyright : (c) Ian Lynagh 2005 -- License : BSD or GPL v2 -- -- Maintainer : igloo@earth.li -- Stability : provisional -- Portability : non-portable (uses STUArray) -- -- ...
johnjcamilleri/maltese-functional-morphology
lib/LCS.hs
lgpl-3.0
8,221
0
21
2,491
1,690
874
816
96
5
import Language.Atom blink :: Atom () blink = do on <- bool "on" True period ph $ phase 0 $ atom "blinkOn" $ do call "avr_blink" on <== not_ (value on) period ph $ phase (quot ph 100) $ atom "blinkOff" $ do call "avr_blink" on <== not_ (value on) where ph = 680000 main :: IO () main = do ...
dysinger/coduino
src/atom.hs
apache-2.0
923
3
13
303
326
155
171
28
1
{-# LANGUAGE CPP, PackageImports, ScopedTypeVariables #-} -- | In which the state of a State monad is persisted to disk. module Control.Monad.Trans.State.Persistent where import Control.Applicative import Control.Monad #if MIN_VERSION_base(4,12,0) && !MIN_VERSION_base(4,13,0) import Control.Monad.Fail (MonadFail) #end...
gelisam/hawk
src/Control/Monad/Trans/State/Persistent.hs
apache-2.0
3,334
0
19
852
662
367
295
44
2
module Blockchain.VM.Code where import qualified Data.ByteString as B -- import Legacy.Haskoin.V0102.Network.Haskoin.Internals import Numeric import Text.PrettyPrint.ANSI.Leijen import qualified Blockchain.Colors as CL import Blockchain.Data.Code import Blockchain.ExtWord import Blockchain.Format import Blockchain.U...
zchn/ethereum-analyzer
ethereum-analyzer-deps/src/Blockchain/VM/Code.hs
apache-2.0
1,870
0
14
339
635
332
303
46
2
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-} module Inference where import Bound import Control.Applicative import Control.Lens ...
ekmett/ermine
tests/properties/Inference.hs
bsd-2-clause
4,041
0
17
1,023
1,515
810
705
104
1
{-# LANGUAGE ScopedTypeVariables, BangPatterns #-} module PCD.Internal.StorableFieldType (parseBinaryPoints, pokeBinaryPoints) where import Control.Applicative import Control.Lens ((^.)) import Control.Monad (void) import qualified Data.Vector as B import qualified Data.Vector.Mutable as BM import PCD.Header import For...
acowley/pcd-loader
src/PCD/Internal/StorableFieldType.hs
bsd-3-clause
3,839
0
20
1,189
1,346
675
671
78
2
module Hrpg.Framework.Combat.CombatResult ( CombatResult (..) ) where import Hrpg.Framework.Combat.Dmg data CombatResult = MeleeHit Dmg | MeleeCrit Dmg | MeleeDodge deriving (Show, Eq)
cwmunn/hrpg
src/Hrpg/Framework/Combat/CombatResult.hs
bsd-3-clause
219
0
6
56
52
33
19
8
0
----------------------------------------------------------------------------- -- | -- License : BSD-3-Clause -- Maintainer : Oleg Grenrus <oleg.grenrus@iki.fi> -- module GitHub.Data.Webhooks where import GitHub.Data.Id (Id) import GitHub.Data.URL (URL) import GitHub.Internal.Prelude import Prel...
jwiegley/github
src/GitHub/Data/Webhooks.hs
bsd-3-clause
13,571
0
27
4,524
2,277
1,159
1,118
304
0
{-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TemplateHaskell #-} {-# ...
tomberek/RETE
src/RETE/Lib2.hs
bsd-3-clause
9,312
0
18
2,425
4,243
2,177
2,066
-1
-1
{- (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section[CoreRules]{Transformation rules} -} {-# LANGUAGE CPP #-} -- | Functions for collecting together and applying rewrite rules to a module. -- The 'CoreRule' datatype itself is declared elsewhere. module Rules ( -- ** Constructing empt...
sdiehl/ghc
compiler/specialise/Rules.hs
bsd-3-clause
49,728
0
18
14,021
7,283
3,871
3,412
499
5
module FP.Pretty where import FP.Core import FP.Free import FP.Monads -- Setup {{{ -- newtype Color256 = Color256 { color256Raw :: Int } deriving (ToInteger, ToString) instance FromInteger Color256 where fromInteger i | i >= 0 && i < 256 = Color256 $ fromInteger i | otherwise = error "Color256 va...
davdar/quals
src/FP/Pretty.hs
bsd-3-clause
10,459
0
16
2,431
4,602
2,369
2,233
-1
-1
module Main where import Test.Tasty import Test.Tasty.HUnit import TestHelpers import SplitBill main = defaultMain tests tests :: TestTree tests = testGroup "Tests" [unitTests] unitTests = testGroup "Unit tests" [ iBoughtFoodForMyself , iBoughtFoodForHim , iBoughtFoodForBoth , heBoughtFoodForMe , heBoug...
Minoru/split-bill-hs
test/TestMain.hs
bsd-3-clause
1,994
0
11
556
459
259
200
56
1
{-# LANGUAGE FlexibleContexts #-} import XMonad import XMonad.Layout.LayoutScreens import XMonad.Util.EZConfig (additionalKeys) import XMonad.Hooks.Focus import Data.Tagged import Control.Monad import Sgf.Control.Lens import Sgf.XMonad.Config import Sgf.XMonad.Restartable import Sgf.XMonad.Restartable.Firefox import...
sgf-dma/sgf-xmonad-config
src/xmonad.hs
bsd-3-clause
7,738
0
16
2,935
1,313
718
595
127
1
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFa...
AjayRamanathan/plots
src/Plots/Types/Bubble.hs
bsd-3-clause
4,479
0
13
1,124
1,124
629
495
86
1
-- | module ChainComplexProperties where import Control.Category.Constrained (id, (.)) import Control.Monad (forM_, unless) import Math.Algebra.ChainComplex import Test.Hspec import Prelude hiding (id, (.)) isEqOn :: (Num d, Eq a', Show a', Show a) => a -> UMorphism d a a' -> UMorphism d a a' -> Expectation isEqOn b ...
mvr/at
test/ChainComplexProperties.hs
bsd-3-clause
2,617
0
16
596
1,311
682
629
-1
-1
{-# LANGUAGE LambdaCase #-} {-# LANGUAGE ScopedTypeVariables #-} module Text.Stencil.Helper ( loadTemplatesInDir , loadTemplates ) where import Text.Stencil.Types import Control.Exception (SomeException, try) import System.Directory (doesFileExist, getCurrentDirectory) import System.FilePath (normal...
ibotty/stencil
src/Text/Stencil/Helper.hs
bsd-3-clause
776
0
14
141
204
115
89
19
2
{-# language CPP #-} -- | = Name -- -- VK_EXT_vertex_input_dynamic_state - device extension -- -- == VK_EXT_vertex_input_dynamic_state -- -- [__Name String__] -- @VK_EXT_vertex_input_dynamic_state@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 353 -- -- [__Revisio...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_EXT_vertex_input_dynamic_state.hs
bsd-3-clause
30,171
0
17
5,119
3,601
2,154
1,447
-1
-1