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, UnicodeSyntax #-} module Main where import Prelude.Unicode import Development.Shake.FilePath import Hakyll import Text.Pandoc.Options import Paths main :: IO () main = hakyllWith myConfiguration $ do match "installation-guide/*.md" $ do route $ setExtension "...
c0c0n3/archlinux
vm/src/build/Site.hs
gpl-3.0
882
0
12
206
180
97
83
24
1
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE...
dysinger/amazonka
amazonka/src/Control/Monad/Trans/AWS.hs
mpl-2.0
13,967
0
13
3,973
2,607
1,459
1,148
256
1
{-# LANGUAGE TypeFamilies #-} module Gonimo.Server.Db.Internal where import Control.Lens import Control.Monad.State.Class import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Maybe (MaybeT) import Control.Monad.Trans.Reader (ReaderT (..))...
gonimo/gonimo-back
src/Gonimo/Server/Db/Internal.hs
agpl-3.0
1,463
0
13
415
358
203
155
-1
-1
{-# LANGUAGE GADTs #-} module Main where import Criterion.Main import Crypto.Noise import Crypto.Noise.DH import Keys import Types genMessage :: (Cipher c, DH d, Hash h) => Bool -- ^ True if we are writing a message -> Maybe ScrubbedBytes -- ^ If a PSK is called for, this value ...
centromere/cacophony
benchmarks/Main.hs
unlicense
4,237
0
17
1,343
1,142
577
565
95
5
module Algo.Graph ( bellmanFord ) where -- Bellman for algorithm for shortest path search bellmanFord = undefined dijkstra = undefined
seckcoder/lang-learn
haskell/algo/src/Algo/Graph.hs
unlicense
157
0
4
42
22
14
8
4
1
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE RecordWildCards #-} module Chinese.Game where import Chinese.Dictionary import Chinese.Player import Data.Time import Prelude hiding (Word) import ...
abailly/acquire
chinese/src/Chinese/Game.hs
apache-2.0
4,285
0
17
1,856
996
518
478
74
3
{-# LANGUAGE DeriveDataTypeable #-} module CabalNew.Types ( CabalNew(..) , CabalTarget(..) , YesodBackend(..) , GitLevel(..) ) where import Data.Data data GitLevel = GitHere | ParentGit | Gitless deriving (Show, Eq, Data, Typeable) data CabalTarget = Executable ...
erochest/cabal-new
CabalNew/Types.hs
apache-2.0
1,253
0
9
559
246
151
95
35
0
{-# LANGUAGE OverloadedStrings, FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Documentation.Haddock.ParserSpec (main, spec) where import Data.String import qualified Documentation.Haddock.Parser as Parse import Documentation.Haddock.Types import ...
JPMoresmau/haddock
haddock-library/test/Documentation/Haddock/ParserSpec.hs
bsd-2-clause
33,142
0
27
11,404
6,454
3,152
3,302
716
2
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances, UndecidableInstances #-} {-| Tools for extracting unique variables from various types that contain them. -} module BRC.Solver.VariablesIn where import Data.List (nub) import qualified Data.Set as DS import BRC.Constraint -- | A class f...
kcharter/brc-solver
BRC/Solver/VariablesIn.hs
bsd-2-clause
1,128
0
9
260
324
176
148
18
1
{-# LANGUAGE Haskell2010 #-} {-# LANGUAGE TypeFamilies #-} module Types where data Quux = Bar | Baz newtype Foo = Foo () type FooQuux = (Foo, Quux) type QuuxFoo = (Quux, Foo) data family Norf a b data instance Norf Foo Quux = NFQ Foo Quux data instance Norf Quux Foo = NQF Quux Foo type family Norf' a b type...
haskell/haddock
hypsrc-test/src/Types.hs
bsd-2-clause
748
0
10
174
363
199
164
25
1
{-# LANGUAGE BangPatterns,CPP #-} #if __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif -- | -- Module : Data.Text.Lazy.Encoding -- Copyright : (c) 2009, 2010 Bryan O'Sullivan -- -- License : BSD-style -- Maintainer : bos@serpentine.com -- Stability : experimental -- Portability : portable --...
hvr/text
Data/Text/Lazy/Encoding.hs
bsd-2-clause
8,947
0
14
1,611
1,409
822
587
118
3
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.HP.OcclusionTest -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability...
haskell-opengl/OpenGLRaw
src/Graphics/GL/HP/OcclusionTest.hs
bsd-3-clause
686
0
5
95
52
39
13
8
0
{-# LANGUAGE TypeFamilies, TupleSections, OverloadedStrings #-} module File.Binary.Classes (Field(..), Binary(..), pop, push) where import Data.ByteString.Lazy (ByteString, unpack, singleton, cons') import qualified Data.ByteString.Lazy.Char8 as BSLC () import Data.Bits ((.&.), (.|.), shiftL, shiftR) import Data.Mono...
YoshikuniJujo/binary-file
src/File/Binary/Classes.hs
bsd-3-clause
2,389
10
14
534
1,132
611
521
59
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE DuplicateRecordFields #-} module Mapnik.ImageFilter ( ImageFilter(..) , ColorStop (..) , parse , parseMany , toText , toTextMany , imageFilterParser ) where import Mapnik.Imports import Mapnik.Util import...
albertov/hs-mapnik
pure/src/Mapnik/ImageFilter.hs
bsd-3-clause
3,785
0
15
658
1,175
639
536
105
1
module Distribution.Solver.Modular.Index ( Index , PInfo(..) , defaultQualifyOptions , mkIndex ) where import Data.List as L import Data.Map as M import Prelude hiding (pi) import Distribution.Solver.Modular.Dependency import Distribution.Solver.Modular.Flag import Distribution.Solver.Modular.Pack...
sopvop/cabal
cabal-install/Distribution/Solver/Modular/Index.hs
bsd-3-clause
1,983
0
14
539
459
268
191
28
1
{-# LANGUAGE BangPatterns, CPP, OverloadedStrings #-} import Control.Exception import Control.Monad import Data.Aeson import Data.Attoparsec import Data.Time.Clock import System.Environment (getArgs) import System.IO import qualified Data.ByteString as B import Control.DeepSeq #if !MIN_VERSION_bytestring(0,10,0) impo...
moonKimura/aeson-0.6.2.1
benchmarks/AesonEncode.hs
bsd-3-clause
1,307
0
22
354
451
225
226
37
2
{-# LANGUAGE OverloadedStrings #-} module LayoutHUnit ( layoutTestCases ) where import Prelude hiding (lex, filter, map) import qualified Data.Text as T import qualified Data.Set as S import Data.MonadicStream hiding (concat, concatMap) import Language.Forvie.Lexing.Spec import ...
bobatkey/Forvie
tests/LayoutHUnit.hs
bsd-3-clause
2,927
0
13
745
862
487
375
65
2
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE StandaloneDeriving#-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE AllowAmbiguousTypes #-} -- 2016-05-15 module LSystem where data LSysF a = A a | B a | X deriving (Show, Functor) newtype Fix f...
sleexyz/haskell-fun
LSystem.hs
bsd-3-clause
1,476
0
11
407
719
374
345
45
1
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, ScopedTypeVariables #-} module Control.Monad.Push.Class where class Monad m => MonadPush a m where -- | Push an item onto the stack push :: a -> m ()
wyager/FastPush
src/Control/Monad/Push/Class.hs
bsd-3-clause
233
0
9
42
42
23
19
4
0
module Main where import Lib main :: IO () main = startGame
gtrogers/maybe-hero
app/Main.hs
bsd-3-clause
62
0
6
14
22
13
9
4
1
module TechnicalIndicators.Core ( dup , dup3 , dup4 , dup5 , pair , pair3 , pair4 , pair5 , cross , cross3 , cross4 , cross5 , single , para , para3 , para4 , para5 ) where import Control.Arrow...
cutsea110/sig
sig-api/TechnicalIndicators/Core.hs
bsd-3-clause
3,857
0
13
1,174
2,399
1,392
1,007
-1
-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. module Duckling.Numeral.HU.Tests ( tests ) where import Data.String import Prelude import Test.Tasty import Du...
facebookincubator/duckling
tests/Duckling/Numeral/HU/Tests.hs
bsd-3-clause
503
0
9
77
79
50
29
11
1
import Test.QuickCheck import qualified Foreign.C.Math.Double as C main = sequence_ [ quickCheck $ \x -> C.acos x == acos x , quickCheck $ \x -> C.asin x == asin x , quickCheck $ \x -> C.atan x == atan x -- note: , quickCheck $ \x y -> C.atan2 x y == atan2 x y ...
barak/haskell-cmath
tests/QC.hs
bsd-3-clause
948
0
13
399
422
215
207
-1
-1
--------------------------------------------------------------------------------------------------- {-# LANGUAGE QuasiQuotes #-} {-# OPTIONS_GHC -F -pgmF htfpp #-} {-# LANGUAGE OverloadedStrings #-} module ParserTest where import Test.Framework import Text.RawString.QQ import qualified Data.Text as T import Compil...
thomkoehler/FunLang
test/ParserTest.hs
bsd-3-clause
1,225
0
12
272
279
160
119
31
1
module FileSystems where import System.IO import Control.Monad.IO.Class import Control.Monad import qualified Data.ByteString as B import qualified Data.Map as M import Data.Word import qualified Data.ByteString.Internal as BS (c2w, w2c) import Data.Bits import Numeric data VHandle = HHandle Handle | BHandle Int B.By...
dpiponi/Bine
src/FileSystems.hs
bsd-3-clause
398
0
7
54
101
65
36
12
0
module Main ( main, ) where ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- import qualified Instrument.Tests.CloudWatch import Test.Tasty --------------------------------------------------------------...
Soostone/instrument
instrument-cloudwatch/test/Main.hs
bsd-3-clause
491
0
7
55
65
40
25
11
1
-- extensions {{{ {-# LANGUAGE DeriveFunctor, FlexibleContexts, FlexibleInstances, FunctionalDependencies, GeneralizedNewtypeDeriving, MultiParamTypeClasses, OverloadedStrings, RankNTypes, UndecidableInstances #-} -- }}} -- exports {{{ module Database.AODB.Storage -- types. ( Chunk...
fperleta/aodb
src/Database/AODB/Storage.hs
bsd-3-clause
5,886
0
15
1,742
1,792
918
874
138
2
module Vandelay.App.Cmd.Init ( initTemplate , SortOptions(..) , SourceFileReferences(..) ) where import Control.Monad.Trans.RWS (RWST, runRWST, tell) import System.FilePath import Vandelay.DSL.Core import qualified Data.Map as M -- Initialize template initTempl...
tumarkin/vandelay
src/Vandelay/App/Cmd/Init.hs
bsd-3-clause
7,726
0
17
1,993
1,802
939
863
-1
-1
{-# LANGUAGE OverloadedStrings #-} import qualified Data.Text as T import Data.Text (Text) import Data.ByteString (ByteString) import Test.Hspec import Test.HUnit (Assertion, assertBool, assertFailure, (@=?), (@?=)) import Database.Disque main :: IO () mai...
creichert/disque.hs
test/Spec.hs
bsd-3-clause
922
0
13
262
218
114
104
25
1
module Mire.Reactive.Timer ( module Export, makeTimer, ) where import Mire.Prelude import Reactive.Banana import Reactive.Banana.Frameworks import Control.Concurrent.Timer.Lifted import Control.Concurrent.Suspend.Lifted as Export timerAddHandler :: Delay -> MomentIO (AddHandler ()) timerAddHandler delay = lif...
ellej/mire
src/Mire/Reactive/Timer.hs
bsd-3-clause
615
0
15
106
193
103
90
17
1
{-# LANGUAGE OverloadedStrings #-} -- | -- Module: MailchimpSimple -- License: BSD3 -- Maintainer: Dananji Liyanage <dan9131@gmail.com> -- Stability: experimental -- -- Types and functions for working with Mailchimp JSON API Version 3.0 module MailchimpSimple ( -- ** Working with Lists -- $lists list...
Dananji/MailchimpSimple
src/MailchimpSimple.hs
bsd-3-clause
18,460
0
16
5,379
4,208
2,097
2,111
304
4
module Lambda.DataType.Error.Compile where import DeepControl.Monad.Except import Lambda.DataType.Common -------------------------------------------------- -- Data -------------------------------------------------- data CompileError = DESUGAR String | RESTORE String | TYPEOF Stri...
ocean0yohsuke/Simply-Typed-Lambda
src/Lambda/DataType/Error/Compile.hs
bsd-3-clause
626
0
8
153
142
78
64
14
0
x = 4 y = 5
roberth/uu-helium
test/parser/LayoutOk9.hs
gpl-3.0
12
0
4
6
11
6
5
2
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="sr-CS"> <title>TLS Debug | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref l...
veggiespam/zap-extensions
addOns/tlsdebug/src/main/javahelp/org/zaproxy/zap/extension/tlsdebug/resources/help_sr_CS/helpset_sr_CS.hs
apache-2.0
971
80
66
160
415
210
205
-1
-1
{-# LANGUAGE NoMonomorphismRestriction, ScopedTypeVariables, BangPatterns #-} module Main where import MandelObs as O import MandelAcc as A import Criterion.Main import Criterion.Types import System.Environment import Prelude as P import qualified Prelude as P hiding (zipWith,sum,take,drop,iterate) import Obsidian....
aesadde/AccObsBenchmarks
Mandel/src/Main.hs
bsd-3-clause
1,702
0
13
410
478
268
210
38
1
module Graphics.Gnuplot.Terminal.PNG ( T, cons, transparent, noTransparent, interlace, noInterlace, trueColor, noTrueColor, fontTiny, fontSmall, fontMedium, fontLarge, fontGiant, ) where import qualified Graphics.Gnuplot.Private.Terminal as Terminal import Data.Maybe (catMaybes, ) import Graphics.Gnu...
wavewave/gnuplot
src/Graphics/Gnuplot/Terminal/PNG.hs
bsd-3-clause
2,342
0
19
603
656
371
285
66
5
module Bead.Domain.Entity.Notification where import Data.Text -- The notifications can come from different sources data NotifType = Comment | Feedback | System deriving (Eq, Show) notifType comment feedback system n = case n of Comment -> comment Feedback -> feedback System -> system ...
pgj/bead
src/Bead/Domain/Entity/Notification.hs
bsd-3-clause
542
0
8
121
121
68
53
19
3
-- -*- mode: haskell -*- module Control.XmlTime where data XmlTime = XmlTime String
Erdwolf/autotool-bonn
src/Control/XmlTime.hs
gpl-2.0
86
0
6
15
16
10
6
2
0
{-# LANGUAGE TupleSections, TemplateHaskell, CPP, UndecidableInstances, MultiParamTypeClasses, TypeFamilies, GeneralizedNewtypeDeriving #-} {-| Functions of the metadata daemon exported for RPC -} {- Copyright (C) 2014 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or w...
dimara/ganeti
src/Ganeti/Metad/ConfigCore.hs
bsd-2-clause
4,600
0
14
830
582
327
255
57
1
{- Module : CSH.Eval.Frontend.Members Description : The route handler for the members page Copyright : Stephen Demos, Matt Gambogi, Travis Whitaker, Computer Science House 2015 License : MIT Maintainer : pvals@csh.rit.edu Stability : Provisional Portability : POSIX DOCUMENT THIS! -} {-# LANGUAGE QuasiQuo...
robgssp/csh-eval
src/CSH/Eval/Frontend/Members.hs
mit
2,094
0
13
448
417
237
180
41
2
import Test.Cabal.Prelude -- The one local package, pkg, has a setup dependency on setup-dep-2.0, which is -- in the repository. main = cabalTest $ do skipUnless =<< hasNewBuildCompatBootCabal withRepo "repo" $ do r <- recordMode DoNotRecord $ cabal' "new-build" ["pkg"] -- pkg's setup script should print o...
mydaum/cabal
cabal-testsuite/PackageTests/NewBuild/CustomSetup/LocalPackageWithCustomSetup/build-local-package-with-custom-setup.test.hs
bsd-3-clause
430
0
14
81
67
33
34
6
1
module LocalSettingsCabal where import Paths_HaRe import GHC.Paths ( libdir ) --GHC.Paths is available via cabal install ghc-paths -- rELEASE_ROOT = hare_version = version -- release_root= showNoQuotes "${RELEASE_ROOT}" --release_root = getDataFileName "." release_root = "." {- refactorer = showNoQuotes "${REFAC...
RefactoringTools/HaRe
old/editors/LocalSettingsCabal.hs
bsd-3-clause
1,392
0
6
163
149
87
62
17
1
{-# LANGUAGE PartialTypeSignatures #-} module PatBind3 where -- Oddly GHC 8.0 accepted this, but it should obvoiusly fail! foo :: (Bool, _) -> Char Just foo = Just id
snoyberg/ghc
testsuite/tests/partial-sigs/should_fail/PatBind3.hs
bsd-3-clause
168
0
6
30
33
19
14
4
1
{-# LANGUAGE TypeFamilies #-} module Class3 where class C a where foo :: a -> a instance C () bar :: (a ~ ()) => a -> a bar = foo
ryantm/ghc
testsuite/tests/indexed-types/should_compile/Class3.hs
bsd-3-clause
136
0
8
37
59
32
27
7
1
module Y2016.M09.D23.Exercise where -- below imports available from 1HaskellADay git repository import Data.BlockChain.Block.Blocks import Data.BlockChain.Block.Summary import Data.BlockChain.Block.Transactions import Data.BlockChain.Block.Types import Data.Monetary.BitCoin import Data.Relation import Graph.Query ...
geophf/1HaskellADay
exercises/HAD/Y2016/M09/D23/Exercise.hs
mit
2,234
0
10
396
151
97
54
14
1
module Solidran.FastaSpec (spec) where import Test.Hspec import Solidran.Fasta import qualified Data.Map as Map spec :: Spec spec = do describe "Solidran.Fasta" $ do describe "parse" $ do it "should give an empty map on empty string" $ do parse "" `shouldBe` Map.empty ...
Jefffrey/Solidran
test/Solidran/FastaSpec.hs
mit
1,553
0
19
804
303
164
139
43
1
module STSpec ( main , spec ) where import Numeric.LinearAlgebra.Easy import Test.Hspec spec :: Spec spec = do describe "withSTMatrix" $ do it "should create expected matrix" $ do let m = withSTMatrix 9 3 3 $ \m -> do writeMatrix m 0 0 10...
rcook/mlutil
easyla/spec/STSpec.hs
mit
867
0
20
356
321
182
139
24
1
{-# LANGUAGE NamedFieldPuns, RecordWildCards #-} -------------------------------------------------------------------------------- -- Haskell asteroid game -------------------------------------------------------------------------------- module Main where import Data.IORef import Data.List import Data.Time import Data....
nandor/hasteroid
Main.hs
mit
11,011
0
21
3,524
3,699
1,862
1,837
263
1
--Find the last but one element of a list. module Problem02 where lst = [1,2,3,4,5] myButLast :: [a] -> a myButLast (x:y:[]) = x myButLast (_:xs) = myButLast xs myButLast' :: [a] -> a myButLast' [x,_] = x myButLast' (x:xs) = myButLast' xs
Matt-Renfro/haskell
H-99/Problem2.hs
mit
252
0
9
56
120
68
52
8
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module Buchhaltung.Uniques where import Buchhaltung.Common import Control.Arrow hiding (loop) import Control.Monad.RWS.S...
johannesgerer/buchhaltung
src/Buchhaltung/Uniques.hs
mit
8,223
0
24
2,468
2,424
1,289
1,135
157
8
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-} module GHCJS.DOM.JSFFI.Generated.UIEvent (js_initUIEvent, initUIEvent, js_getView, getView, js_getDetail, getDetail, js_getKeyCode, getKeyCode, js_getCharCode, getCharCode, js_getLayerX, getLayerX, js_getLayerY, getLayerY, ...
manyoo/ghcjs-dom
ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/UIEvent.hs
mit
4,724
70
11
737
1,169
647
522
70
1
-- Get all possible products of two lists of numbers -- https://www.codewars.com/kata/57da6a507691c30926000042 module AllProducts where import Control.Applicative(liftA2) getProducts :: [Integer] -> [Integer] -> [Integer] getProducts = flip $ liftA2 (*)
gafiatulin/codewars
src/Beta/AllProducts.hs
mit
257
0
7
33
52
32
20
4
1
module Graph.SparseSet ( module Graph.Type.SparseSet , bronKerboschLai ) where import Graph.Type.SparseSet import Data.Set hiding (map) import Prelude hiding (null) -------------------------------------------------------------------------------- -- Utilities vertices :: Graph -> Vertices vertices (Gra...
banacorn/Graphentheoretische-Paralleler-Algorithmus
src/Graph/SparseSet.hs
mit
1,274
0
10
351
337
182
155
23
1
{-# OPTIONS_GHC -fno-warn-deprecations #-} module Network.HTTP.Toolkit ( -- * Exceptions -- | -- * All functions that consume input fail with `UnexpectedEndOfInput` if the -- input ends before the function can completely successfully. -- -- * All cases where a function may fail with an exception other than -- @Unex...
zalora/http-kit
src/Network/HTTP/Toolkit.hs
mit
1,148
0
5
207
137
99
38
28
0
module Phocid ( phocid , runWithPhocid ) where ------------------------------------------------------------------------------ import Data.List (sort) import Options.Applicative import System.Directory import System.FilePath import System.Exit ------------------------------------------------...
mjhoy/phocid
src/Phocid.hs
gpl-2.0
1,720
0
15
462
417
211
206
45
2
x0 :: Double x0 = 380.0 y0 :: Double y0 = 370.0 vxmax = 6.0 grv = 0.21875 vymax = -6.5 p :: Double -> (Double,Double) p t = (x0 + vxmax * t, grv/2.0 * t * t + vymax *t + y0) yl = 310.0 intersection :: Double intersection = (-1) * sqrt ( (2.0*(yl-y0))/grv + (vymax*vymax)/(grv*grv) ) - vymax/grv
pmiddend/jumpie
research/platform_math_proto.hs
gpl-3.0
303
0
16
70
177
98
79
12
1
{-# LANGUAGE TemplateHaskell, TypeApplications, ScopedTypeVariables, RankNTypes #-} module Lamdu.Calc.Term.Utils ( Composite(..), tags, rest , case_ , recExtend , culledSubexprPayloads ) where import qualified Control.Lens as Lens import Hyper (Recursively(..), HFoldable(..), (#>), withD...
Peaker/lamdu
src/Lamdu/Calc/Term/Utils.hs
gpl-3.0
1,839
0
17
502
632
333
299
-1
-1
{- Copyright 2010 John Morrice This source file is part of The Obelisk Programming Language and is distributed under the terms of the GNU General Public License This file is part of The Obelisk Programming Language. The Obelisk Programming Language is free software: you can redistribute it and/or modify it...
elginer/Obelisk
license_labeller.hs
gpl-3.0
1,697
0
10
352
226
117
109
19
1
module Turn ( Visibility (..) ,Turn ,never ,firstTurn ,nextTurn) where data Turn = Turn Integer | Never deriving (Eq, Ord) newtype Visibility = Visibility { seenOn :: Turn } instance Show Turn where show Never = "Never" show (Turn t) = "Turn " ++ show t firstTurn :: Turn firstTurn = Turn 0 never :: Tu...
bhickey/catamad
src/Turn.hs
gpl-3.0
420
0
8
94
161
90
71
18
1
module Semantics ( step, reduce ) where import AST -- |Performs a single step of reduction step :: AST -> AST step (SUM (NUM n1) (NUM n2)) = NUM (n1 + n2) step (SUM (NUM n1) m) = SUM (NUM n1) (step m) step (SUM m n) = SUM (step m) n step (SUB (NUM n1) (NUM n2)) = NUM (n1 - n2) step (SUB (NUM n1) m) = SUB (NUM n...
marco-zanella/minilambda
src/Semantics.hs
gpl-3.0
1,156
0
9
289
733
368
365
31
3
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-games/gen/Network/Google/Resource/Games/Achievements/Reveal.hs
mpl-2.0
4,818
0
18
1,169
708
413
295
106
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/Threads/Modify.hs
mpl-2.0
3,657
0
16
900
465
279
186
73
1
module System.Delta.Base where import System.IO.Error import System.FilePath import System.Directory import Data.Time.Clock.POSIX newtype FileInfo = FileInfo (FilePath,Integer,Bool) deriving (Ord,Eq,Show) fileInfoPath :: FileInfo -> FilePath fileInfoPath (FileInfo (path,_,_)) = path -- | File modif...
kryoxide/delta
src/main/delta/System/Delta/Base.hs
lgpl-3.0
822
0
13
134
255
140
115
20
1
module Main where import System.Environment import System.IO import PLexceptGOTOdotNET main = do args <- getArgs case args of ["parse", fileName] -> workOnFile pa fileName ["labelloops", fileName] -> workOnFile loopLabel fileName ["interpret", fileName] -> ...
catseye/PL-GOTO.NET
src/Main.hs
unlicense
742
0
10
206
166
83
83
22
5
{-# LANGUAGE BangPatterns #-} module Kernel.CPU.FFT where import Data.IORef import Foreign.C import Foreign.Ptr import Data import Vector data FftPlanOpaque type FftPlan = Ptr FftPlanOpaque foreign import ccall unsafe fftInitThreading :: IO () foreign import ccall "fft_inplace_even" fftInplaceEven :: FftPlan ...
SKA-ScienceDataProcessor/RC
MS4/dna-programs/Kernel/CPU/FFT.hs
apache-2.0
1,909
0
12
399
672
336
336
-1
-1
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.Map as M import qualified Text.Show.Pretty as Pretty import System.Environment(getArgs) import Data.Maybe (mapMaybe) import System.FilePath (splitExtension) import Prelude import Pcc import Lst import Fs type PCCMap = M.Map String [String] ...
gamelost/pcgen-rules
src/Pcgen.hs
apache-2.0
1,609
0
16
364
483
249
234
47
3
{-# LANGUAGE TypeSynonymInstances #-} module Model where import Prelude import Yesod import Yesod.Auth.HashDB hiding (User, UserGeneric(..), UniqueUser) import Data.Text (Text) import Database.Persist.Quasi import Database.Persist.MongoDB import Language.Haskell.TH.Syntax import GitUtils (UserName) -- You can define ...
konn/gitolist
Model.hs
bsd-2-clause
895
0
11
184
167
99
68
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : HEP.Parser.LHE.Conduit -- Copyright : (c) 2010-2014 Ian-Woo Kim --...
wavewave/LHEParser
src/HEP/Parser/LHE/Conduit.hs
bsd-2-clause
2,839
0
12
614
630
354
276
50
2
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QCalendarWidget.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:20 Warning : this file is machine generated - ...
uduki/hsQt
Qtc/Gui/QCalendarWidget.hs
bsd-2-clause
62,422
0
15
9,385
18,884
9,569
9,315
-1
-1
newtype NondetT m a = NondetT { runNondetT :: m [a] }
davdar/quals
writeup-old/sections/04MonadicAAM/04Optimizations/00Widen/04NondetT.hs
bsd-3-clause
54
0
8
12
22
14
8
1
0
module Helix where import Rumpus start :: Start start = do spawnChildren [0..100] $ \i -> do myShape ==> Cube mySize ==> V3 0.5 0.02 0.02 myPose ==> positionRotation (V3 0 (0.5+i*0.1) 0) (axisAngle (V3 0 1 0) (i*0.2)) myColor ==> colorHSL (i*0.2) 0.5 0.7 r...
lukexi/rumpus
pristine/Intro/Helix.hs
bsd-3-clause
328
0
17
110
145
72
73
11
1
-- ------------------------------------------------------------ {- | Module : Yuuko.Text.XML.HXT.Arrow.Edit Copyright : Copyright (C) 2006-9 Uwe Schmidt License : MIT Maintainer : Uwe Schmidt (uwe@fh-wedel.de) Stability : stable Portability: portable common edit arrows -} -- ---------...
nfjinjing/yuuko
src/Yuuko/Text/XML/HXT/Arrow/Edit.hs
bsd-3-clause
23,058
700
14
5,180
4,219
2,428
1,791
427
4
module SegmentationTests where import Test.QuickCheck import Data.Char import Prose.Types import Prose.Segmentation.Graphemes as Graph import Prose.Segmentation.Words as Word import Prose.Internal.GraphemeBreakTest as GBT import Prose.Internal.WordBreakTest as WBT a1s = "óòo̧ö" :: String a1accents = filter (not.is...
llelf/prose
tests/SegmentationTests.hs
bsd-3-clause
1,002
0
11
223
250
138
112
20
1
{-# LANGUAGE RecursiveDo #-} module Main where import LOGL.Application import LOGL.Camera import Foreign.Ptr import Graphics.UI.GLFW as GLFW import Graphics.Rendering.OpenGL.GL as GL hiding (normalize, position) import Graphics.GLUtil import System.FilePath import Graphics.Rendering.OpenGL.GL.Shaders.ProgramObjects im...
atwupack/LearnOpenGL
app/2_Lighting/2_Basic-lighting/Basic-lighting-specular.hs
bsd-3-clause
4,146
0
15
793
1,181
570
611
93
1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.GlSpirv -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : p...
haskell-opengl/OpenGLRaw
src/Graphics/GL/ARB/GlSpirv.hs
bsd-3-clause
744
0
5
105
62
46
16
10
0
-- | Extra functions for optparse-applicative. module Options.Applicative.Builder.Extra (boolFlags ,boolFlagsNoDefault ,maybeBoolFlags ,firstBoolFlags ,enableDisableFlags ,enableDisableFlagsNoDefault ,extraHelpOption ,execExtraHelp ,textOption ,textArgument ,optionalFirst ) where import Contro...
phadej/stack
src/Options/Applicative/Builder/Extra.hs
bsd-3-clause
5,791
0
20
2,003
1,057
563
494
109
2
module Spreadsheet.Renderer where import Data.List import Data.Ratio import Numeric import Spreadsheet import ListUtilities renderCell :: CellType -> CellValue -> String renderCell StringT (StringV xs) = xs renderCell (NumberT Nothing) (NumberV n) | denominator n == 1 = show (numerator n) renderCell (Numb...
glguy/simple-spreadsheet-tools
lib/Spreadsheet/Renderer.hs
bsd-3-clause
3,273
0
14
901
1,125
567
558
90
15
{-# OPTIONS_GHC -Wall #-} -- | Get the roots of shifted Legendre and Radau polynomials -- -- >>> shiftedLegendreRoots 3 -- Just [0.11270166537925831,0.5,0.8872983346207417] -- >>> shiftedRadauRoots 2 -- Just [0.1550510257216822,0.6449489742783178] -- -- The roots are pre-computed and only a finite number are provided...
ghorn/jacobi-roots
src/JacobiRoots.hs
bsd-3-clause
2,453
0
9
350
247
159
88
18
1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE FlexibleContexts #-} module Scripts.ComadReview where import ClassyPrelude import Appian import Appian.Types import Appian.Instances import Appian.Lens import Appian.Client import Data.Aeson import Data.Aeson.Lens import Control.Lens i...
limaner2002/EPC-tools
USACScripts/src/Scripts/ComadReview.hs
bsd-3-clause
10,141
0
25
2,350
2,853
1,414
1,439
-1
-1
{-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TupleSections #-} module Control.Broccoli.Eval where import Control.Applicative import Data.List import Data.Ord import Data.Monoid import Data.Maybe import Control.Comonad import Test.QuickCheck import Test.QuickCheck.Function import Data.Map (Map) impor...
evanrinehart/broccoli
Control/Broccoli/Eval.hs
bsd-3-clause
14,305
0
19
3,629
6,624
3,418
3,206
354
16
module Data.Empty where import Data.Countable import Data.Searchable class (Finite n) => Empty n where never :: n -> a instance (Empty a, Empty b) => Empty (Either a b) where never (Left a) = never a never (Right a) = never a instance (Empty a, Finite b) => Empty (a, b) where never (a, _) = never a ...
AshleyYakeley/countable
src/Data/Empty.hs
bsd-3-clause
904
0
8
228
372
190
182
-1
-1
---------------------------------------------------------------------------- -- | -- Module : ModuleWithImportsAndHiding -- Copyright : (c) Sergey Vinokurov 2015 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com ---------------------------------------------------------------------...
sergv/tags-server
test-data/0001module_with_imports/ModuleWithImportsAndHiding.hs
bsd-3-clause
443
0
5
62
40
27
13
5
1
{-# LANGUAGE FlexibleContexts #-} module EFA.Data.ND.Cube.Grid where import qualified EFA.Data.Vector as DV import qualified EFA.Data.ND as ND import qualified EFA.Data.Axis.Strict as Axis import EFA.Utility(Caller,ModuleName(..),(|>),FunctionName, genCaller) import qualified Type.Data.Num.Unary as Unary import qua...
energyflowanalysis/efa-2.1
src/EFA/Data/ND/Cube/Grid.hs
bsd-3-clause
3,137
0
13
623
1,140
606
534
75
2
{-# LANGUAGE DeriveDataTypeable, DeriveGeneric, MultiParamTypeClasses #-} module FOmega.SemanticSig where import Control.Monad (forM) import Data.Typeable(Typeable) import GHC.Generics (Generic) import Unbound.Generics.LocallyNameless (Bind, Embed, Alpha, Subst, LFresh) import qualified Unbound.Generics.LocallyName...
lambdageek/insomnia
src/FOmega/SemanticSig.hs
bsd-3-clause
5,431
0
17
1,185
1,437
757
680
116
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Client.SetupWrapper -- Copyright : (c) The University of Glasgow 2006, -- Duncan Coutts 2008 -- -- Maintainer : cabal-devel@haskell.org -- Stability : alpha -- Portability : port...
yihuang/cabal-install
Distribution/Client/SetupWrapper.hs
bsd-3-clause
13,810
0
17
3,547
2,799
1,482
1,317
250
21
module ImageQuery.Printer where import ImageQuery ( ImageQueryStatement(SetImageQueryParameter,GetImageQueryResult), ImageQueryParameter(Threshold,Channel,Smoothing,SubRect,StencilImage,Polarity), ImageQuery(TableQuery,IslandImage,ImageOfAverage,LineImage,AreaHistogram), TableQuery(ValueInPoint,Average...
phischu/pem-images
src/ImageQuery/Printer.hs
bsd-3-clause
3,200
0
8
340
727
404
323
60
1
module Main where import Data.IORef import Data.Time.Clock import Control.Concurrent.ParallelIO.Global n :: Int n = 1000000 main :: IO () main = do r <- newIORef (0 :: Int) let incRef = atomicModifyIORef r (\a -> (a, a)) time $ parallel_ $ replicate n $ incRef v <- readIORef r stopGlobalPool ...
batterseapower/parallel-io
Control/Concurrent/ParallelIO/Benchmark.hs
bsd-3-clause
499
0
13
128
191
96
95
21
1
-- -- -- ---------------- -- Exercise 7.8. ---------------- -- -- -- module E'7''8 where import Test.QuickCheck elemNum :: Integer -> [Integer] -> Integer elemNum _ [] = 0 elemNum referenceInteger (integer : remainingIntegers) | integer /= referenceInteger = (elemNum referenceInteger remainingIntegers) ...
pascal-knodel/haskell-craft
_/links/E'7''8.hs
mit
1,413
0
10
320
297
163
134
19
1
module AssignTypes where import Types import Obj import Util import TypeError import Data.List (nub) import qualified Data.Map as Map import Debug.Trace {-# ANN assignTypes "HLint: ignore Eta reduce" #-} -- | Walk the whole expression tree and replace all occurences of VarTy with their corresponding actual type. ass...
eriksvedang/Carp
src/AssignTypes.hs
mpl-2.0
2,730
0
17
595
708
352
356
59
7
{-# 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-ml/gen/Network/AWS/MachineLearning/CreateBatchPrediction.hs
mpl-2.0
8,385
0
13
1,675
929
563
366
119
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# L...
romanb/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/AssignVolume.hs
mpl-2.0
3,798
0
9
787
428
261
167
54
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="hu-HU"> <title>Ruby Scripting</title> <maps> <homeID>top</homeID> <mapref location="ma...
veggiespam/zap-extensions
addOns/jruby/src/main/javahelp/org/zaproxy/zap/extension/jruby/resources/help_hu_HU/helpset_hu_HU.hs
apache-2.0
962
84
52
157
395
208
187
-1
-1
-- | Server methods to do user authentication. -- -- We authenticate clients using HTTP Basic or Digest authentication and we -- authorise users based on membership of particular user groups. -- {-# LANGUAGE PatternGuards #-} module Distribution.Server.Framework.Auth ( -- * Checking authorisation guardAuthorise...
isomorphism/hackage2
Distribution/Server/Framework/Auth.hs
bsd-3-clause
13,865
0
20
3,506
2,906
1,538
1,368
220
5
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RecordWildCards #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Compare.JsonBuilder () where import Prelude.Compat hiding ((<>)) import Data.Json.Builder import Data.Monoid ((<>)) import Twitter instance JsObject Metadata...
dmjio/aeson
benchmarks/bench/Compare/JsonBuilder.hs
bsd-3-clause
1,815
0
19
409
485
239
246
55
0
{- (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 \section{Haskell abstract syntax definition} This module glues together the pieces of the Haskell abstract syntax, which is declared in the various \tr{Hs*} modules. This module, therefore, is almost nothing but re-export...
ezyang/ghc
compiler/hsSyn/HsSyn.hs
bsd-3-clause
4,681
0
21
1,447
666
385
281
71
1
{-# LANGUAGE ForeignFunctionInterface #-} {-# LANGUAGE EmptyDataDecls #-} module Data.Streaming.Zlib.Lowlevel ( ZStreamStruct , ZStream' , zstreamNew , Strategy(..) , deflateInit2 , inflateInit2 , c_free_z_stream_inflate , c_free_z_stream_deflate , c_set_avail_in , c_set_avail_ou...
fpco/streaming-commons
Data/Streaming/Zlib/Lowlevel.hs
mit
3,501
0
12
626
760
407
353
-1
-1
{-# LANGUAGE TemplateHaskell, FlexibleInstances, MultiParamTypeClasses, PatternGuards #-} -- -- Copyright (c) 2005-6 Don Stewart - http://www.cse.unsw.edu.au/~dons -- GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html) -- -- grab a random line of code from a directory full of .hs code -- module Plugin.Co...
zeekay/lambdabot
Plugin/Code.hs
mit
2,985
0
16
1,077
873
440
433
52
1
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-} module Logic where import Data.Dynamic as Dynamic import Text.ParserCombinators.Parsec -- the identity of a language class (Show id, Typeable id) => Language id where language_name :: id -> String language_name = show -- categories, needed for s...
keithodulaigh/Hets
mini/Logic.hs
gpl-2.0
2,994
0
12
879
690
385
305
48
0
{-# LANGUAGE CPP #-} main = do #if !defined(VERSION_containers) putStrLn "OK" #endif
sdiehl/ghc
testsuite/tests/driver/T11763.hs
bsd-3-clause
89
0
7
16
15
8
7
3
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="pt-BR"> <title>Form Handler | ZAP Extension</title> <maps> <homeID>top</homeID> <mapref...
kingthorin/zap-extensions
addOns/formhandler/src/main/javahelp/org/zaproxy/zap/extension/formhandler/resources/help_pt_BR/helpset_pt_BR.hs
apache-2.0
973
83
52
159
396
209
187
-1
-1