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
----------------------------------------------------------------------------- -- | -- Module : Writer.Formats.SlugsIn -- License : MIT (see the LICENSE file) -- Maintainer : Ioannis Filippidis (jfilippidis@gmail.com) -- Felix Klein (klein@react.uni-saarland.de) -- -- Translates GR(1) specifi...
reactive-systems/syfco
src/lib/Writer/Formats/SlugsIn.hs
mit
4,729
0
21
2,199
1,192
585
607
96
36
module Calendar ( calendarWidget ) where import Import hiding (for) import Data.Time.Calendar import Data.Time.Calendar.WeekDate import Data.Time.Calendar.MonthDay import Helpers import Model.Event data Calendar = Calendar { months :: [Month] } deriving (Show) data Month = Month { month :: Int , year :: ...
isankadn/yesod-testweb-full
Calendar.hs
mit
7,165
0
13
1,729
1,540
840
700
-1
-1
module Binomial where binomial :: Int -> Int -> Int binomial n k | 0 <= k && k < n = ((binomial (n-1) (k-1)) + (binomial (n-1) k)) | k == 0 || n == k = 1 | otherwise = 0
chr0n1x/haskell-things
binomial.hs
mit
185
0
11
58
119
61
58
6
1
{-# LANGUAGE OverloadedStrings #-} module Biri.Backend.Routes ( generate ) where import Control.Monad (mfilter) import Data.Char (toLower, toUpper) import qualified Data.IntMap.Strict as IM import Data.List (intercalate) import Data.Map.Strict (Map) import qualified Data.Map.Strict as M import Data.Maybe (fromMaybe) ...
am-/biri-lang
src/Biri/Backend/Routes.hs
mit
2,239
0
17
567
712
391
321
50
1
{-# LANGUAGE OverloadedStrings #-} module Test.Smoke.App.Diff.ExternalDiffCommand ( Command, enabled, render, ) where import Control.Exception (throwIO) import Data.List.NonEmpty (NonEmpty ((:|))) import qualified Data.List.NonEmpty as NonEmpty import Data.Maybe (isJust) import qualified Data.Text as Text...
SamirTalwar/Smoke
src/app/Test/Smoke/App/Diff/ExternalDiffCommand.hs
mit
1,621
0
24
430
408
227
181
47
3
module GHCJS.DOM.RTCStatsResponse ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/RTCStatsResponse.hs
mit
46
0
3
7
10
7
3
1
0
module Main where import System.Environment import Language.Camle.Parser import Language.Camle.AstToIr import Text.PrettyPrint main = do [filename] <- getArgs ast <- parseWhile filename case ast of (Left error) -> print error (Right program) -> putStr ....
willprice/camle-compiler
src/IRMain.hs
mit
359
0
13
109
101
53
48
11
2
{-# LANGUAGE ForeignFunctionInterface #-} module Geometry.Clipping where import Geometry.Point import Geometry.Polygon import Foreign.Marshal.Array import Foreign.Ptr import System.IO.Unsafe import Foreign.C import Data.Int import Data.Coerce foreign import ccall "wrapper.cpp UnionArea" unionAreaPtr :: Ptr CLLong...
LukaHorvat/ArtGallery
src/Geometry/Clipping.hs
mit
2,579
0
11
553
791
412
379
57
1
module Exercise where pascal :: Int -> [[Int]] pascal n = [(pascal' k) | k <- [0..n]] pascal' :: Int -> [Int] pascal' 0 = [1] pascal' 1 = [1, 1] pascal' n = [1] ++ pascal'' (pascal' (n-1)) ++ [1] pascal'' :: [Int] -> [Int] pascal'' n = zipWith (+) n (tail n)
tcoenraad/functioneel-programmeren
2014/opg1c.hs
mit
263
0
11
58
162
90
72
9
1
module Solidran.Fibd.DetailSpec (spec) where import Test.Hspec import Solidran.Fibd.Detail spec :: Spec spec = do describe "Solidran.Fibd.Detail" $ do describe "countRabbits" $ do it "after 1 month, the count should be 1" $ do countRabbits 1 1 `shouldBe` 1 it "shoul...
Jefffrey/Solidran
test/Solidran/Fibd/DetailSpec.hs
mit
1,746
0
17
713
477
235
242
39
1
module Data.Name.Internal.Spec where import Data.Name.Internal import Test.Hspec import Test.Hspec.QuickCheck spec :: Spec spec = do describe "digits" $ do it "zero is zero in base 10" $ digits 10 0 `shouldBe` [0 :: Integer] it "10 has two digits in base 10" $ digits 10 10 `shouldBe` [1, 0 :: I...
antitypical/Surface
test/Data/Name/Internal/Spec.hs
mit
1,490
0
16
373
450
242
208
33
1
{-# htermination (>=) :: Int -> Int -> Bool #-}
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/full_haskell/Prelude_GTEQ_5.hs
mit
48
0
2
10
3
2
1
1
0
module Solidran.Math (factorial) where factorial :: Int -> Integer factorial n = product [1..toInteger n]
Jefffrey/Solidran
src/Solidran/Math.hs
mit
107
0
7
16
39
21
18
3
1
{-# LANGUAGE CPP #-} {- Copyright (C) 2008 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. ...
thielema/gitit
gitit.hs
gpl-2.0
6,160
0
18
1,395
1,468
762
706
123
8
module Point3D where import Data.Vector.Storable hiding ((++)) import qualified Data.Vector.Storable as V import Foreign import Foreign.C.Types data Point3D = Point3D {-# UNPACK #-} !Double {-# UNPACK #-} !Double {-# UNPACK #-} !Double data Axis = X | Y | Z deriving (Eq,...
peterspackman/hsqc
src/Point3D.hs
gpl-3.0
2,311
0
13
631
1,076
562
514
69
3
module Reliquary.Core.TypeCheck where import Control.Monad.Except import Reliquary.Core.AST import Reliquary.Core.DeBruijn import Reliquary.Core.Evaluate import Reliquary.Core.Utils import Debug.Trace envLookup :: Int -> CoreEnv -> Maybe (CoreTerm, Int) envLookup n env = if n >= l then Nothing else Just $ env !! n ...
chameco/reliquary
src/Reliquary/Core/TypeCheck.hs
gpl-3.0
2,398
0
15
901
836
405
431
61
11
module CC.ShellCheck.Env where import CC.ShellCheck.Types import qualified Data.Map.Strict as DM import Data.Maybe import qualified Data.Yaml as YML import System.Directory -------------------------------------------------------------------------------- -- | Load environment that maps r...
filib/codeclimate-shellcheck
src/CC/ShellCheck/Env.hs
gpl-3.0
616
0
12
132
124
68
56
13
2
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} {-| Module : Data.Valet Description...
momomimachli/Valet
src/Data/Valet.hs
gpl-3.0
35,551
0
18
9,441
7,977
4,022
3,955
-1
-1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
designer/source/MEnv/System/GLFW.hs
gpl-3.0
1,424
0
7
298
168
96
72
19
1
-- Copyright 2016, 2017 Robin Raymond -- -- This file is part of Purple Muon -- -- Purple Muon 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) an...
r-raymond/purple-muon
src/Client/States/InGameState/Loop.hs
gpl-3.0
7,042
0
7
1,985
249
216
33
-1
-1
-- This file is part of KSQuant2. -- Copyright (c) 2010 - 2011, Kilian Sprotte. All rights reserved. -- 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 -- (...
kisp/ksquant2
MeasureToLily.hs
gpl-3.0
3,101
0
12
902
899
484
415
52
5
{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} -- | A Norm is a generalisation of the notion of length or magnituge of a vector. The archetypal norm is just the length of a vector, though the absolute value...
RossOgilvie/MathPrelude
MathPrelude/Classes/Norm.hs
gpl-3.0
1,884
0
8
383
277
163
114
-1
-1
{-# OPTIONS_HADDOCK ignore-exports #-} module Fog_Display ( display, initfn, keyboardMouse ) where import Graphics.Rendering.OpenGL import Graphics.UI.GLUT import Data.IORef data TriObject = TriObject {v1 :: Vertex3 GLfloat, v2 :: Vertex3 GLfloat, v3 :: Verte...
rmcmaho/Haskell_OpenGL_Examples
Fog/Fog_Display.hs
gpl-3.0
6,852
0
12
2,373
2,010
1,044
966
147
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/SubAccounts/Patch.hs
mpl-2.0
3,704
0
15
881
507
298
209
75
1
{-# OPTIONS -cpp -fglasgow-exts #-} module Poly where import Data.Typeable data Fn = Fn {fn :: forall t. Eq t => t -> t -> Bool} -- -- ignore type inside the Fn... is this correct? -- instance Typeable Fn where #if __GLASGOW_HASKELL__ >= 603 typeOf _ = mkTyConApp (mkTyCon "Poly.Fn") [] #else typeOf _ = mkAp...
stepcut/plugins
testsuite/eval/eval_fn1/Poly.hs
lgpl-2.1
354
0
12
73
80
46
34
-1
-1
module Git.Command.IndexPack (run) where run :: [String] -> IO () run args = return ()
wereHamster/yag
Git/Command/IndexPack.hs
unlicense
87
0
7
15
42
23
19
3
1
{-# LANGUAGE NoImplicitPrelude #-} module Bantam.Service.Api.Fight ( Fight (..) , MatchesError (..) , currentLemma ) where import Bantam.Service.Data import Bantam.Service.Data.Fight import P import X.Control.Monad.Trans.Either (EitherT, runEitherT) data MatchesErr...
charleso/bantam
bantam-service/src/Bantam/Service/Api/Fight.hs
unlicense
1,343
0
14
326
404
223
181
29
1
{-# OPTIONS_GHC -Wall #-} module LogAnalysis where import Log -- parseMessage "E 2 562 help help" == LogMessage (Error 2) 562 "help help" -- parseMessage "I 29 la la la" == LogMessage Info 29 "la la la" -- parseMessage "This is not in the right format" == Unknown "This is not in the right format" parseMessa...
beloglazov/haskell-course
hw2.hs
apache-2.0
1,831
0
13
510
614
314
300
42
4
{- Copyright 2019 The CodeWorld Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicab...
alphalambda/codeworld
codeworld-requirements/src/CodeWorld/Requirements/RequirementsChecker.hs
apache-2.0
1,779
0
18
497
279
143
136
29
3
{-# LANGUAGE OverloadedStrings #-} -- |Initialize a ROS Package with roshask support. module PkgInit (initPkg) where import Data.ByteString.Char8 (ByteString, pack) import qualified Data.ByteString.Char8 as B import Data.Char (toLower, toUpper) import Data.List (intercalate) import Data.Version (versionBranch) import S...
rgleichman/roshask
src/executable/PkgInit.hs
bsd-3-clause
5,692
0
15
2,117
1,190
641
549
100
2
{-# LANGUAGE CPP #-} {-# OPTIONS_GHC -fno-warn-missing-import-lists #-} {-# OPTIONS_GHC -fno-warn-implicit-prelude #-} module Paths_AuthServer ( version, getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getDataFileName, getSysconfDir ) where import qualified Control.Exception as Exception i...
Garygunn94/DFS
AuthServer/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/autogen/Paths_AuthServer.hs
bsd-3-clause
2,185
0
10
239
410
238
172
33
1
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.Raw.NV.LightMaxExponent -- Copyright : (c) Sven Panne 2013 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable -- Portability : portable...
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/LightMaxExponent.hs
bsd-3-clause
882
0
4
114
62
47
15
8
1
{-# LANGUAGE OverloadedStrings, DeriveGeneric, FlexibleInstances, RecordWildCards #-} {- FIXME: fuck man.. this should be mkQueue'Deq not mkQueue.. having problems compiling, cabal dependency hell wreckage -} import System.Environment import ZTail import Abstract.Wrapper import Abstract.Queue import Abstract.Interfa...
adarqui/Ztail-Tools
tools/ztail-dump.hs
bsd-3-clause
2,996
8
24
699
897
457
440
75
2
module Main where import DockerCompose import DockerComposeSpec import Test.Hspec main :: IO () main = mapM_ hspec [ dockerComposeSpec ]
amarpotghan/docker-compose-dsl
test/Spec.hs
bsd-3-clause
169
0
6
52
38
22
16
6
1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Web.RTBBidder.Types.Request.Deal (Deal(..)) where import qualified Data.Aeson as AESON import Data.Aeson ((.=), (.:), (.:?), (.!=)) import qualified Data.Text as TX data Deal = Deal { dealId :: TX.Text , dealBidfloor :: Double , dealBidf...
hiratara/hs-rtb-bidder
src/Web/RTBBidder/Types/Request/Deal.hs
bsd-3-clause
1,109
0
12
249
362
204
158
34
0
{- | API for finite state automatons -} module FST.AutomatonInterface ( module FST.RegTypes, module FST.AutomatonTypes, -- * Types Automaton, -- * Construction of automatons compile, compileNFA, -- * Transformation of automatons determinize, minimize, complete, -- * Query inforation ...
johnjcamilleri/fst
FST/AutomatonInterface.hs
bsd-3-clause
1,974
0
9
372
400
217
183
36
1
{-# LANGUAGE OverloadedStrings, DeriveGeneric #-} module Data.Text.Phonetical where import Data.Text.Phonetical.Internal import Data.Attoparsec.Text import qualified Data.List as L import Data.Text import Control.Applicative phonetic :: Dictionary -> Text -> Text phonetic dict istr = case (parseOnly (parseAllInDicti...
smurphy8/phonetical
src/Data/Text/Phonetical.hs
bsd-3-clause
1,633
0
16
374
610
306
304
41
2
{-# LANGUAGE ScopedTypeVariables #-} module Control.Funky.Run where import Data.Default (Default, def) import qualified Data.Vector as V import Control.Funky.Type {-| evaluate the executable machine into vector of results. -} run :: forall a. Default a => Machine (Thunk a) -> Machine a run (...
nushio3/funky
Control/Funky/Run.hs
bsd-3-clause
591
0
11
157
195
104
91
14
1
module Klesi ( Minde(..), Text(..), Selbri(..), Tag(..), Sumti(..), Mex(..), RelativeClause(..) ) where import Language.Lojban.Parser(Free(..)) -------------------------------------------------------------------------------- data Minde = KLAMA Double Double | CRAKLA Double | RIXYKLA Double | ZUNLE Double ...
YoshikuniJujo/cakyrespa
src/Klesi.hs
bsd-3-clause
1,841
30
9
388
639
380
259
80
0
module Network.Probecraft.Packet.Arp ( Arp (..) , arpSize , MACAddress , HardwareType (..) , ProtoType (..) , OpCode (..) , blankArp ) where import qualified Data.ByteString as B import Data.Binary import Data.Binary.Put import Data.Binary.Get import Control.Monad import Network.Probecra...
lucasdicioccio/probecraft-hs
Network/Probecraft/Packet/Arp.hs
bsd-3-clause
3,122
0
11
817
800
417
383
81
1
{-# LANGUAGE NoMonomorphismRestriction #-} module Mandelbrot where import Diagrams.Prelude hiding (magnitude) import Diagrams.Backend.PGF import qualified Diagrams.Backend.PGFSystem as Sys pgfM d = pgfR "latex.pdf" latexSurface d >> pgfR "plain.pdf" plaintexSurface d >> pgfR "context.pdf" contextSurf...
cchalmers/pgf-system
examples/Mandelbrot.hs
bsd-3-clause
728
0
9
149
228
115
113
17
1
---------------------------------------------------------------------------- -- | -- Module : Control.Monad.Logging -- Copyright : (c) Sergey Vinokurov 2016 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com -- Created : Wednesday, 24 August 2016 ------------------------------...
sergv/tags-server
src/Control/Monad/Logging.hs
bsd-3-clause
3,096
0
11
612
863
472
391
81
2
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NoMonomorphismRestriction #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeSy...
UCSD-PL/RefScript
src/Language/Rsc/Parser/Common.hs
bsd-3-clause
1,586
0
10
410
303
170
133
32
1
-- | A few helpers to work with the AST annotations module BrownPLT.JavaScript.Syntax.Annotations where import BrownPLT.JavaScript.Syntax import Data.Traversable import Control.Applicative import Control.Arrow import Control.Monad.State hiding (mapM) import Prelude hiding (mapM) -- | removes annotations removeAnnota...
brownplt/webbits
src/BrownPLT/JavaScript/Syntax/Annotations.hs
bsd-3-clause
3,594
0
12
1,249
1,304
653
651
89
1
{-# LANGUAGE OverloadedStrings, ViewPatterns #-} module Crawl.Play ( play ) where import Control.Applicative ((<$>), pure, (<*>), liftA2, (<|>)) import Control.Monad (forever, guard) import Data.List (intersect) import Data.Maybe (fromMaybe, listToMaybe, isJust) import System.Exit (exitWith, ExitCode(ExitSuccess)...
rwbarton/rw
Crawl/Play.hs
bsd-3-clause
18,330
0
30
5,559
6,119
3,168
2,951
-1
-1
module Data.Blockchain.Mining.Block ( MineBlockException(..) , mineBlock , mineEmptyBlock , mineGenesisBlock ) where import qualified Data.ByteString.Char8 as Char8 import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Time.Clock as Time import qualified Data.Word ...
TGOlson/blockchain
lib/Data/Blockchain/Mining/Block.hs
bsd-3-clause
4,816
0
12
986
833
437
396
-1
-1
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} module Touch where import Control.Monad import Data.Aeson.Types import Debug.Trace import Miso data Touch = Touch { identifier :: Int , screen :: (Double, Double) , client :: (Double, Double) , page :: (Double, Double) } deriving (Eq, Show)...
dmjio/miso
examples/svg/Touch.hs
bsd-3-clause
1,128
0
15
237
372
203
169
35
1
{-# LANGUAGE CPP, DeriveGeneric #-} ----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.Program.Find -- Copyright : Duncan Coutts 2013 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- A somewhat extended notion of the ...
randen/cabal
Cabal/Distribution/Simple/Program/Find.hs
bsd-3-clause
7,382
0
22
1,749
1,271
696
575
102
11
{-# LANGUAGE DeriveDataTypeable #-} {- -*- Mode: haskell; -*- Haskell LDAP Interface Copyright (C) 2005-2009 John Goerzen <jgoerzen@complete.org> This code is under a 3-clause BSD license; see COPYING for details. -} {- | Module : LDAP.Exceptions Copyright : Copyright (C) 2005-2009 John Goerzen License ...
ezyang/ldap-haskell
LDAP/Exceptions.hs
bsd-3-clause
3,701
0
13
887
423
227
196
35
1
{-# LANGUAGE Safe #-} {-# LANGUAGE BangPatterns #-} {-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Concurrent.QSemN -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libr...
rahulmutt/ghcvm
libraries/base/Control/Concurrent/QSemN.hs
bsd-3-clause
4,130
0
19
1,162
939
514
425
66
6
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE BangPatterns #-} module Optical ( P.either , P.all , P.and , P.any , P.concat , P.concatMap , P.mapM_ , P.notElem , P.or , P.sequence_ , (P.<$>) , P.maybe -- , P.lines -- , P.unlines...
cchalmers/optical
src/Optical.hs
bsd-3-clause
16,237
2
12
4,057
4,583
2,620
1,963
434
2
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} module Snap.Internal.Http.Server.Session.Tests (tests) where...
sopvop/snap-server
test/Snap/Internal/Http/Server/Session/Tests.hs
bsd-3-clause
40,432
0
22
12,109
8,799
4,437
4,362
-1
-1
{-# LANGUAGE Haskell98 #-} {-# LINE 1 "Network/Wai/Handler/Warp/IORef.hs" #-} {-# LANGUAGE CPP #-} module Network.Wai.Handler.Warp.IORef ( module Data.IORef ) where import Data.IORef
phischu/fragnix
tests/packages/scotty/Network.Wai.Handler.Warp.IORef.hs
bsd-3-clause
311
0
5
150
25
18
7
6
0
yes = C { f = (e h) }
mpickering/hlint-refactor
tests/examples/Bracket12.hs
bsd-3-clause
21
1
9
8
27
12
15
1
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples #-} ----------------------------------------------------------------------------- -- | -- Module : Data.IORef -- Copyright : (c) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LI...
frantisekfarka/ghc-dsi
libraries/base/Data/IORef.hs
bsd-3-clause
5,378
0
15
1,131
590
343
247
41
1
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE CPP, NoImplicitPrelude #-} {-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Buffer -- Copyright : (c) The University of Glasgow 2008 -- License : see libraries/base/LIC...
frantisekfarka/ghc-dsi
libraries/base/GHC/IO/Buffer.hs
bsd-3-clause
9,008
10
19
2,047
2,184
1,180
1,004
143
2
module Fixme where {-@ hsig :: x:a -> {v:[a] | v == (x:[])} @-} hsig :: a -> [a] hsig x = [x] {- This crashes with (VV#F1 = fix#GHC.Types.#58##35#64([x#aJP; fix#GHC.Types.#91##93##35#6m([])])) z3Pred: error converting (VV#F1 = fix#GHC.Types.#58##35#64([x#aJP; fix#GHC.Types.#91##93##35#6m([])])) Fatal error: ...
mightymoose/liquidhaskell
tests/todo/ListDataCons.hs
bsd-3-clause
519
0
6
66
29
18
11
3
1
----------------------------------------------------------------------------- -- | -- Module : Distribution.Simple.UHC -- Copyright : Andres Loeh 2009 -- License : BSD3 -- -- Maintainer : cabal-devel@haskell.org -- Portability : portable -- -- This module contains most of the UHC-specific code for conf...
DavidAlphaFox/ghc
libraries/Cabal/Cabal/Distribution/Simple/UHC.hs
bsd-3-clause
11,353
0
21
2,856
2,309
1,243
1,066
184
5
f xs = case map id xs of [] -> True x:xs -> False
urbanslug/ghc
testsuite/tests/ghci.debugger/scripts/result001.hs
bsd-3-clause
68
1
8
32
39
17
22
3
2
{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE ExistentialQuantification #-} module CannotDoRep1_0 where import GHC.Generics -- We do not support existential quantification data Dynamic a = forall b. Dynamic b a deriving Generic1
forked-upstream-packages-for-ghcjs/ghc
testsuite/tests/generics/GenCannotDoRep1_0.hs
bsd-3-clause
244
0
6
48
32
21
11
5
0
module Main (main) where import GHC.Conc import Control.Concurrent import Control.Exception import System.Exit main = do m <- newEmptyMVar let action = do setAllocationCounter (10*1024) enableAllocationLimit print (length [1..]) forkFinally action (putMVar m) r <- takeMV...
urbanslug/ghc
testsuite/tests/concurrent/should_run/allocLimit2.hs
bsd-3-clause
443
0
15
115
155
73
82
15
2
-- | Interface to the Futhark parser. module Language.Futhark.Parser ( parseFuthark, parseExp, parseModExp, parseType, parseValue, parseValues, parseDecOrExpIncrM, ParseError (..), scanTokensText, L (..), Token (..), ) where import qualified Data.Text as T import Language.Fu...
HIPERFIT/futhark
src/Language/Futhark/Parser.hs
isc
1,817
0
9
338
282
166
116
47
1
module Robot (Robot, initialState, mkRobot, resetName, robotName) where import Control.Monad.State (StateT) data Robot = Dummy1 data RunState = Dummy2 initialState :: RunState initialState = error "You need to implement this function" mkRobot :: StateT RunState IO Robot mkRobot = error "You need to implement this f...
exercism/xhaskell
exercises/practice/robot-name/src/Robot.hs
mit
534
0
7
86
131
71
60
12
1
-------------------------------------------------------------------------------- -- Sum square difference -- Problem 6 -- The sum of the squares of the first ten natural numbers is, -- 1^2 + 2^2 + ... + 10^2 = 385 -- -- The square of the sum of the first ten natural numbers is, -- (1 + 2 + ... + 10)^2 = 55^2 = 3025 --...
bertdouglas/euler-haskell
001-050/06a.hs
mit
907
0
9
182
126
74
52
7
1
--duality.hs module Duality where data GuessWhat = Chickenbutt deriving Show data Id a = MkId deriving Show data Product a b = Product a b deriving Show data Sum a b = First a | Second b deriving Show data RecordProduct a b = RecordProduct { pfirst :: a , psecond :: b } ...
deciduously/Haskell-First-Principles-Exercises
3-Getting serious/11-Algebraic Datatypes/code/duality.hs
mit
619
0
8
155
177
107
70
18
1
module Main where import Data.Semigroup import Options.Applicative import Apple.Maclight data MaclightOpts = MaclightOpts { backlight :: Light , lightCommand :: Command } options :: Parser MaclightOpts options = MaclightOpts <$> argument auto ...
tych0/maclight
src/maclight.hs
mit
908
0
12
301
192
100
92
22
1
module Lesson2.BFS.Types where import Data.Lens.Common (modL) import Data.List (foldl') import Data.Hashable (Hashable(..)) import Data.Ord (Ord(..), comparing) import Data.Set (Set) import qualified Data.Set as Set import Lesson2.Types -------------------------------------------------------------------------------...
roman/ai-class-haskell
src/Lesson2/BFS/Types.hs
mit
1,367
0
10
267
419
220
199
32
1
module Main where import Criterion.Main (defaultMain) import Prelude import qualified Layout.UtilBench as LayoutUtilB import qualified Foreign.Lua.UtilBench as LuaUtilB -------------------------------------------------------------------------------- main :: IO () main = defaultMain [ LayoutUtilB...
rzetterberg/alven
src/bench/Bench.hs
mit
388
0
7
93
63
40
23
8
1
module TestSuites.LoadCSVSpec (spec) where --standard --3rd party import Test.Hspec.Contrib.HUnit(fromHUnitTest) import Test.HUnit --own import HsPredictor.LoadCSV import HsPredictor.Queries import HsPredictor.Types import HelperFuncs (removeIfExists) spec = fromHUnitTest $ TestList [ TestLabel ">>stats" test_sta...
Taketrung/HsPredictor
tests/TestSuites/LoadCSVSpec.hs
mit
1,708
0
14
330
495
244
251
51
1
{-# LANGUAGE BangPatterns, DeriveDataTypeable, DeriveGeneric, FlexibleInstances, MultiParamTypeClasses #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} module Com.Mysql.Cj.Mysqlx.Protobuf.Error.Severity (Severity(..)) where import Prelude ((+), (/), (.)) import qualified Prelude as Prelude' import qualified Data.Typea...
naoto-ogawa/h-xproto-mysql
src/Com/Mysql/Cj/Mysqlx/Protobuf/Error/Severity.hs
mit
2,375
0
11
368
638
352
286
51
1
module Sing where fstString :: [Char] -> [Char] fstString x = x ++ " in the rain" sndString :: [Char] -> [Char] sndString x = x ++ " over the rainbow" sing = if (x < y) then fstString x else sndString y where x = "Singing" y = "Somewhere"
rasheedja/HaskellFromFirstPrinciples
Chapter5/fixIt.hs
mit
252
0
7
63
96
54
42
8
2
module Test.App.Stuff ( tests ) where import Test.Hspec import App.Stuff tests :: IO () tests = hspec $ do describe "Stuff.digits" $ do it "returns list of digits inside number" $ do digits 123490 `shouldBe` [1,2,3,4,9,0] it "returns list of digits inside number" $ do digits 13490 `shouldBe` [1...
triplepointfive/hegine
test/Test/App/Stuff.hs
gpl-2.0
860
0
16
211
351
193
158
20
1
module Cryptography.ComputationalProblems.Games.DiscreteGames.Macro where import Types import Functions.Application.Macro import Macro.Arrows import Macro.Math import Macro.MetaMacro -- * Discrete games -- ** Stop symbol for discrete distinguishers stopsym_ :: Note...
NorfairKing/the-notes
src/Cryptography/ComputationalProblems/Games/DiscreteGames/Macro.hs
gpl-2.0
878
0
6
218
210
123
87
22
1
{-| Module : System.Arte.Decode Description : Main loop for decoding a single trode Copyright : (c) Greg Hale, 2015 Shea Levy, 2015 License : BSD3 Maintainer : imalsogreg@gmail.com Stability : experimental Portability : GHC, Linux -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUA...
imalsogreg/arte-ephys
arte-decoder/src/System/Arte/Decode.hs
gpl-3.0
19,059
65
33
5,797
4,135
2,137
1,998
-1
-1
{-# LANGUAGE BangPatterns #-} module PetaVision.Data.Weight where import Codec.Picture import Control.Monad as M import qualified Data.Array as AU import Data.Array.Repa as R import Data.List as L import Data...
XinhuaZhang/PetaVisionHaskell
PetaVision/Data/Weight.hs
gpl-3.0
9,108
187
22
3,863
2,802
1,494
1,308
225
3
import Test.QuickCheck import Data.List import Prelude -- Not as easy as I first thought. -- Given in lab prime :: Integer -> Bool prime n = n > 1 && all (\ x -> rem n x /= 0) xs where xs = takeWhile (\ y -> y^2 <= n) primes primes :: [Integer] primes = 2 : filter prime [3..] primeProduct n = prime $ (+) 1 $ pr...
vdweegen/UvA-Software_Testing
Lab1/Jordan/exercise6.hs
gpl-3.0
449
1
15
105
193
100
93
11
1
-- grid is a game written in Haskell -- Copyright (C) 2018 karamellpelle@hotmail.com -- -- This file is part of grid. -- -- grid 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 Lice...
karamellpelle/grid
designer/source/MEnv/Env/ScreenObject.hs
gpl-3.0
891
0
5
165
47
40
7
4
0
module IcfpcEndo.Loader where import IcfpcEndo.Endo (mkEndo) import Application.Assets.ConfigScheme import Middleware.Config.Facade import Paths_Endo as P import Data.ByteString.Char8 as X import qualified Data.IORef as IO endoDnaInfo = strOption endoDna load cfg = do dnaFile <- extract cfg endoDnaInfo dnaR...
graninas/ICFPC2007
Endo/IcfpcEndo/Loader.hs
gpl-3.0
458
0
9
77
125
67
58
14
1
{-# OPTIONS_GHC -fdefer-type-errors #-} {-# OPTIONS_GHC -fwarn-typed-holes #-} module Parse (Program(Program), SExpr(Atom,List,Nil), Atom(Symbol,Number), agParse, testText5) where import Data.Functor.Identity import Control.Applicative import Text.Parsec ...
Fizzixnerd/silveretta-hs
src/Parse.hs
gpl-3.0
3,905
2
19
1,175
1,084
585
499
90
6
module Hadolint.Rule.DL3015 (rule) where import Hadolint.Rule import Hadolint.Shell (ParsedShell) import qualified Hadolint.Shell as Shell import Language.Docker.Syntax rule :: Rule ParsedShell rule = simpleRule code severity message check where code = "DL3015" severity = DLInfoC message = "Avoid additi...
lukasmartinelli/hadolint
src/Hadolint/Rule/DL3015.hs
gpl-3.0
815
0
11
136
189
101
88
17
2
import Control.Concurrent import Control.Concurrent.MVar import Control.Monad import Criterion.Main import Data.Foldable import Data.Traversable import GHC.Conc (getNumProcessors) import System.Random import System.Random.Shuffle import qualified Lib as L main :: IO () main = do let numOperations = 10000 real...
paulolieuthier/haskell-concurrent-lists
bench/Main.hs
lgpl-2.1
3,360
0
18
862
1,150
566
584
75
1
module Math.Topology.KnotTh.Tangle.TableOfLinks ( listOfDTCodes ) where listOfDTCodes :: [((Int, Int), [[[Int]]])] listOfDTCodes = [ ((0, 1), [ [[]] ]) , ((2, 2), [ [[4], [2]] ]) , ((3, 1), [ [[4, 6, 2]] ]) , ((4, 1), [ [[4, 6, 8, 2...
mishun/tangles
src/Math/Topology/KnotTh/Tangle/TableOfLinks.hs
lgpl-3.0
18,676
0
10
7,263
14,321
9,406
4,915
406
1
------------------------------------------------------------------------------ -- | -- Module : Control.Concurrent.Barrier.Test -- Copyright : (C) 2010 Aliaksiej Artamonaŭ -- License : LGPL -- -- Maintainer : aliaksiej.artamonau@gmail.com -- Stability : unstable -- Portability : unportable -- -- Unit test...
aartamonau/haskell-barrier
tests/Control/Concurrent/Barrier/Test.hs
lgpl-3.0
3,117
0
15
615
604
310
294
56
1
{-# LANGUAGE OverloadedStrings #-} {-| Module : VizViews Description : Defines the some different look of graphs for the module graphviz. Copyright : (c) Hans-Jürgen Guth, 2014 License : LGPL Maintainer : juergen.software@freea2a.de Stability : experimental Here is the look of the graphs from graphviz defined. Feel f...
testexplode/testexplode
doc/examples/VizViews.hs
lgpl-3.0
3,553
0
23
1,631
597
324
273
48
6
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} module Kubernetes.V1.VolumeMount where import GHC.Generics import Data.Text import qualified Data.Aeson -- | VolumeMount describes a mounting of a Vo...
minhdoboi/deprecated-openshift-haskell-api
kubernetes/lib/Kubernetes/V1/VolumeMount.hs
apache-2.0
776
0
9
130
97
60
37
16
0
{-# OPTIONS -fglasgow-exts #-} ----------------------------------------------------------------------------- {-| Module : QToolBarChangeEvent.hs Copyright : (c) David Harley 2010 Project : qtHaskell Version : 1.1.4 Modified : 2010-09-02 17:02:20 Warning : this file is machine generate...
keera-studios/hsQt
Qtc/Gui/QToolBarChangeEvent.hs
bsd-2-clause
2,562
0
12
352
554
296
258
-1
-1
import Prelude import System.Random import Data.List lottoSelect :: Int -> Int -> IO [Int] lottoSelect k n | k < 0 || n <= 0 = error "k has to be positive and n non-negative." | otherwise = do gen <- newStdGen return (take k (nub (randomRs (1, n) gen)))
2dor/99-problems-Haskell
21-28-lists-again/problem-24.hs
bsd-2-clause
279
0
15
75
114
56
58
9
1
{-# LANGUAGE Trustworthy #-} module Control.Concurrent.MVar ( MVar, newMVar, newEmptyMVar, isEmptyMVar, tryTakeMVar, takeMVar, tryPutMVar, tryReadMVar, readMVar, putMVar, swapMVar, modifyMVar, modifyMVar_, ) where import System.Mock.IO.Internal
3of8/mockio
New_MVar.hs
bsd-2-clause
258
0
4
37
57
39
18
5
0
{-# LANGUAGE FlexibleContexts #-} module HERMIT.Dictionary.New where import Control.Arrow import HERMIT.Context import HERMIT.Core import HERMIT.Kure import HERMIT.External import HERMIT.GHC import HERMIT.ParserCore import HERMIT.Dictionary.Local.Let hiding (externals) externals :: [External] externals = map ((.+ ...
beni55/hermit
src/HERMIT/Dictionary/New.hs
bsd-2-clause
4,066
0
15
920
336
201
135
25
1
{-# LANGUAGE RankNTypes #-} module Web.Twitter.Conduit.Lens ( -- * 'TT.Response' TT.Response , responseStatus , responseBody , responseHeaders -- * 'TT.TwitterErrorMessage' , TT.TwitterErrorMessage , twitterErrorMessage , twitterErrorCode ...
Javran/twitter-conduit
Web/Twitter/Conduit/Lens.hs
bsd-2-clause
2,339
0
9
465
711
401
310
40
1
{-# LANGUAGE Haskell2010 #-} -- | Exporting records. module Bug6( A(A), B(B), b, C(C,c1,c2), D(D,d1), E(E) ) where -- | -- This record is exported without its field data A = A { a :: Int } -- | -- .. with its field, but the field is named separately in the export list -- (the field isn't documented separately since i...
haskell/haddock
html-test/src/Bug6.hs
bsd-2-clause
683
0
8
157
148
103
45
18
0
{-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} module ...
markus-git/signal
src/Signal/Core.hs
bsd-3-clause
7,689
15
19
2,243
3,019
1,587
1,432
190
2
{-# LANGUAGE Strict #-} {-# LANGUAGE OverloadedStrings #-} module Main where import qualified Data.Aeson as A import qualified Data.ByteString.Lazy as L import qualified Data.Map.Strict as Map import Data.Maybe import Data.Monoid ((<>)) import qualified Data.Text as T import qualified Handlers.Lono as LO import quali...
gabesoft/kapi
app/Main.hs
bsd-3-clause
2,202
0
13
432
712
367
345
63
2
module NFA where type RMachine m a = Flow
igraves/flow-arrow
examples/nfa.hs
bsd-3-clause
45
0
4
12
12
9
3
2
0
{-# LANGUAGE UndecidableSuperClasses #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE NoRebindableSyntax #-} module Spatial98 where import Prelude (fromInteger, Bool(..), Monad(..)) import qualified Prelude as P import Data.Foldable import Data.List import Data.Typeable imp...
mikeizbicki/homoiconic
old/Homogeneous/Spatial98.hs
bsd-3-clause
2,920
34
10
623
827
464
363
-1
-1
import Lib main = basicTest defaultConfig
willdonnelly/dyre
Tests/basic/Main.hs
bsd-3-clause
42
0
5
6
12
6
6
2
1
{-# LANGUAGE FunctionalDependencies #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} module Data.Vitals where import qualified Prelude import Control.Lens (makeLenses) import ...
savannidgerinel/health
src/Data/Vitals.hs
bsd-3-clause
2,650
0
12
664
487
279
208
37
1
{-# language CPP #-} -- | = Name -- -- VK_KHR_spirv_1_4 - device extension -- -- == VK_KHR_spirv_1_4 -- -- [__Name String__] -- @VK_KHR_spirv_1_4@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] -- 237 -- -- [__Revision__] -- 1 -- -- [__Extension and Version Depend...
expipiplus1/vulkan
src/Vulkan/Extensions/VK_KHR_spirv_1_4.hs
bsd-3-clause
7,038
0
8
1,289
283
237
46
-1
-1
{-# LANGUAGE PatternSynonyms #-} -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.NV.VertexBufferUnifiedMemory -- Copyright : (c) Sven Panne 2019 -- License : BSD3 -- -- Maintainer : Sven Panne <svenpanne@gmail.com> -- Stability : stable --...
haskell-opengl/OpenGLRaw
src/Graphics/GL/NV/VertexBufferUnifiedMemory.hs
bsd-3-clause
1,993
0
5
230
210
137
73
44
0
{-# OPTIONS_HADDOCK hide #-} -- | -- Copyright : (c) 2011 Simon Meier -- License : BSD3-style (see LICENSE) -- -- Maintainer : Simon Meier <iridcode@gmail.com> -- Stability : experimental -- Portability : tested on GHC only -- -- Testing the correctness of bounded encodings. See the file 'test/TestAll.hs' -- ...
meiersi/system-io-write
src/Codec/Bounded/Encoding/Internal/Test.hs
bsd-3-clause
7,071
5
30
2,128
1,617
889
728
105
2