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 Range (single, prop_rng1) where import Language.Haskell.Liquid.Prelude mynil = [] single x = [x] range :: Int -> Int -> [Int] range i j = [i] prop_rng1 n = map (liquidAssertB . (0 <=)) $ range 0 n
abakst/liquidhaskell
tests/pos/range1.hs
bsd-3-clause
213
0
9
47
97
55
42
7
1
import Control.Concurrent import Control.Exception -- Test blocking of async exceptions in an exception handler. -- The exception raised in the main thread should not be delivered -- until the first exception handler finishes. main = do main_thread <- myThreadId m <- newEmptyMVar forkIO (do { takeMVar m; throwT...
siddhanathan/ghc
testsuite/tests/concurrent/should_run/conc014.hs
bsd-3-clause
845
2
19
188
227
114
113
18
1
-- !!! checking that special ids are correctly handled. module ShouldCompile where as :: [as] as = [head as] qualified :: [qualified] qualified = [head qualified] hiding :: [hiding] hiding = [head hiding] export :: [export] export = [head export] label :: [label] label = [head label] dynamic :: [dynamic] dynamic ...
urbanslug/ghc
testsuite/tests/parser/should_compile/read024.hs
bsd-3-clause
538
0
6
93
195
114
81
21
1
module Misc where import Data.Ord (comparing) import Data.List (sortBy) import Debug.Trace (trace) import Data.Maybe (isJust, isNothing, listToMaybe) import Control.Monad (join) import Control.Applicative ((<$>), (<*>)) powMod :: Integer -> Integer -> Integer -> Integer powMod g n m = powMod' g n where powMod' t 0 ...
dbp/misc
misc.hs
isc
5,751
0
21
1,760
2,932
1,581
1,351
107
8
{-# LANGUAGE OverloadedStrings #-} module FizzBuzz (fizzBuzzer ,fizzerBuzzer ) where import Prelude hiding (unlines, null) import Data.Text (Text, pack, unpack, unlines, null) import Data.Monoid ((<>)) import Helpers (commas, semicolons) import Safe (readDef) fizzerBuzzer :: Text -> (Int, Int) -> Text fizzerBu...
ifo/fbaas
src/FizzBuzz.hs
isc
1,944
0
11
482
768
420
348
52
5
{-# LANGUAGE OverloadedStrings #-} module AccessKeys ( AccessKeys(..) , getAccessKeys , getJsonKeys , createToken ) where import Control.Applicative import Data.Aeson import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Char8 as B import Text.ParserCombinators.Parsec as P import Web.Authenticat...
rdlester/how2gamjam
haskell-old/AccessKeys.hs
mit
2,007
0
13
374
585
296
289
60
1
{-# htermination (rangeSizeChar :: Tup2 Char Char -> MyInt) #-} import qualified Prelude data MyBool = MyTrue | MyFalse data List a = Cons a (List a) | Nil data Tup2 a b = Tup2 a b ; data Char = Char MyInt ; data MyInt = Pos Nat | Neg Nat ; data Nat = Succ Nat | Zero ; data Ordering = LT | EQ | GT ; data...
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/rangeSize_2.hs
mit
5,321
0
15
1,157
2,467
1,297
1,170
131
1
{-# LANGUAGE BangPatterns #-} module Displays (mkDisplayBox,displayTest) where -- , DataType (SCANNER,SCRIM,Simulation,Accident)) where import Prelude hiding (tan) import qualified Graphics.UI.Gtk as G import qualified Data.ByteString.Lazy.Char8 as L (unpack,dropWhile,pack,concat,writeFile,snoc,cons,append,lines, r...
rawlep/EQS
sourceCode/Displays.hs
mit
38,603
333
35
13,617
9,225
4,914
4,311
477
19
{-# LANGUAGE NoMonomorphismRestriction #-} module Language.Rebeca.Fold.Monoid where import Data.Monoid import Language.Fold import Language.Rebeca.Absrebeca import Language.Rebeca.Algebra import Language.Rebeca.Fold type Unify a = RebecaAlgebra a a a a a a a a a a a a a a a a a a a a a a a a a monoidAlgebra = Rebe...
arnihermann/timedreb2erl
src/Language/Rebeca/Fold/Monoid.hs
mit
2,590
0
10
646
846
528
318
82
1
{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} import KeyGraph import qualified Data.ByteString as B import Data.Attoparsec.ByteString.Char8 import Control.Applicative import Data.String (IsString) import Data.Maybe (fromMaybe) import Data.List (permutations) main :: IO () main = do ...
devonhollowood/adventofcode
2015/day13/day13.hs
mit
1,579
0
13
360
543
286
257
38
2
{-| Module: Flaw.FFI.COM.Internal Description: Internal things for integration with Windows COM. License: MIT -} {-# LANGUAGE DeriveDataTypeable #-} module Flaw.FFI.COM.Internal ( HRESULT , IID , REFGUID , REFIID , COMInterface(..) , peekCOMObject , hresultSucceeded , hresultFailed , FailedHRESULT(....
quyse/flaw
flaw-ffi/Flaw/FFI/COM/Internal.hs
mit
1,835
0
11
356
367
206
161
41
1
{-# LANGUAGE OverloadedStrings #-} import qualified Data.ByteString as S import qualified Data.ByteString.Char8 as S8 -- From pack myBStr1 :: S.ByteString myBStr1 = S.pack ("foo" :: String) -- From overloaded string literal. myBStr2 :: S.ByteString myBStr2 = "bar"
riwsky/wiwinwlh
src/bytestring.hs
mit
268
0
6
40
56
36
20
7
1
data Command where -- [begin, end) Range :: Int -> Int -> Integer -> Command deriving (Show) range :: Int -> Int -> Integer -> Command range a b k = Range min(a,b) max(a,b)+1 k
maximg/comp-prog
hackerrank/data-struct/arrays-algo-crush/algo-crush.hs
mit
192
0
8
50
87
47
40
-1
-1
module GiveYouAHead.Build.File ( getFilesList, getOptions, getOptionsFromFile, eoBE, eoEE, extraOptionGet, emptyE ) where import GiveYouAHead.Common(readF) import Control.Monad import Text.Parsec extraOptionGet :: (String,String,String) -> String -> Ei...
Qinka/GiveYouAHead
lib/GiveYouAHead/Build/File.hs
mit
2,423
2
13
987
786
398
388
59
2
{-# OPTIONS_GHC -XFlexibleContexts #-} {-# OPTIONS_GHC -XFlexibleInstances #-} module Chapter_13_my_note where import Chapter_5_my_note ( Shape ( Circle , Rectangle , Triangle ) , area ...
tonyfloatersu/solution-haskell-craft-of-FP
Chapter_13_my_note.hs
mit
11,853
0
14
4,412
4,465
2,404
2,061
-1
-1
{-# LANGUAGE OverloadedStrings , TupleSections , TypeApplications #-} module Main ( main ) where import Prelude hiding (FilePath) import Control.Applicative import Control.Concurrent import Control.Monad import Data.Aeson import Data.Char import Data.Foldable import Data.Maybe import Data.Ord import Dat...
Javran/misc
sensormon/src/Main.hs
mit
3,617
0
20
1,044
875
460
415
92
2
{-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI, GHCForeignImportPrim, UnboxedTuples, MagicHash, UnliftedFFITypes, LambdaCase #-} module GHCJS.DOM.JSFFI.RTCPeerConnection ( module Generated , js_createOffer , createOffer' , createOffer , js_createAnswer , createAnswer' , createAnswer ...
plow-technologies/ghcjs-dom
src/GHCJS/DOM/JSFFI/RTCPeerConnection.hs
mit
6,633
52
15
920
1,416
741
675
-1
-1
module GHCJS.DOM.SVGURIReference ( ) where
manyoo/ghcjs-dom
ghcjs-dom-webkit/src/GHCJS/DOM/SVGURIReference.hs
mit
45
0
3
7
10
7
3
1
0
{-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE OverloadedStrings #-} -- | Provides a dummy authentication module that simply lets a user specify -- his/her identifier. This is not intended for real world use, just for -- testing. module Yesod.Auth.Dummy ( authDummy ) where import Yesod.Auth import Yesod.Form (runIn...
piyush-kurur/yesod
yesod-auth/Yesod/Auth/Dummy.hs
mit
956
0
11
193
181
99
82
19
2
module RenamingSpec (main, spec) where import Test.Hspec import Language.Haskell.Refact.Refactoring.Renaming import TestUtils import System.Directory -- --------------------------------------------------------------------- main :: IO () main = do hspec spec spec :: Spec spec = do describe "Renamin...
SAdams601/ParRegexSearch
test/HaRe/test/RenamingSpec.hs
mit
26,147
0
18
6,627
3,852
1,923
1,929
306
1
{- Reverse a list. -} reverseList :: [a] -> [a] reverseList [] = [] reverseList (h:t) = reverseList t ++ [h]
andrewaguiar/s99-haskell
p05.hs
mit
110
0
7
21
54
29
25
3
1
module Nameless.Evaluation where import Nameless.Data evaluate :: (NamelessExp -> Maybe NamelessExp) -> NamelessExp -> [NamelessExp] evaluate step t = case step t of Just t' -> t : (evaluate step t') _ -> [t] callByValueStep :: NamelessExp -> Maybe NamelessExp callByValueStep (NlCall e1 e2) = case callByValueSte...
mcapodici/haskelllearn
firstlang/simple/src/Nameless/Evaluation.hs
mit
1,511
0
19
341
713
350
363
36
4
{-% ## Rendering to HTML -} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE OverloadedStrings #-} module Text.ProseDoc.Rendering where import Control.Monad.State import Control.Applicative ((<$>),(<*>)) import Control.Arrow ((&&&)) import Data.Default (def) import Data.Monoid import Data.String (fromString) import Dat...
shangaslammi/prose-doc
src/Text/ProseDoc/Rendering.hs
mit
5,856
0
19
1,453
1,559
838
721
112
18
module GenerateCalculi where import System.IO import System.IO.Unsafe import Data.Unique import Data.List import TypeSystem import PatternMatching import FlowDiscovery import Static import TypeSystemForCC import CastInsertion import GenerateAuxiliaryPredicates import FromLambdaProlog import CastManagement import ToLam...
mcimini/Gradualizer
GenerateCalculi.hs
mit
2,907
0
16
641
880
441
439
50
8
module Server.Error ( error404 , error500 ) where import qualified Network.Wai as Wai import qualified Server.Response as Resp import qualified Server.Views as View import Server.Types error404 :: Wai.Response error404 = Resp.error404 View.error404Page error500 :: ServerError -> Wai.Response error500 = Resp.error50...
Jonplussed/url-text-histogram
src/Server/Error.hs
mit
342
0
6
46
86
53
33
11
1
module Network.Campfire.Message where import Network.Campfire.Common import Data.List(intercalate) import Data.Maybe(isJust, fromJust) -- | Request type for retrieving 'Message's. See -- <https://github.com/37signals/campfire-api/blob/master/sections/messages.md#get-recent-messages> -- for additional information. da...
joshmcgrath08/campfire-lib
Network/Campfire/Message.hs
mit
3,922
0
14
795
815
451
364
-1
-1
-- Problems/Problem031.hs module Problems.Problem031 (p31) where import Data.List main = print p31 p31 :: Int p31 = ways [1,2,5,10,20,50,100,200] !! 200 ways :: [Int] -> [Int] ways [] = 1 : repeat 0 ways (coin:coins) = n where n = zipWith (+) (ways coins) (replicate coin 0 ++ n)
Sgoettschkes/learning
haskell/ProjectEuler/src/Problems/Problem031.hs
mit
288
0
10
57
147
83
64
9
1
numeroMayor:: Int->Int numeroMayor x = if x > 100 then x else x*2
travelerfit/Ejercicios-Haskell
ejemplo.hs
gpl-2.0
89
0
6
36
34
18
16
4
2
{-| Implementation of the Ganeti configuration database. -} {- Copyright (C) 2011, 2012 Google Inc. 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 opt...
narurien/ganeti-ceph
src/Ganeti/Config.hs
gpl-2.0
11,893
0
20
2,785
2,591
1,350
1,241
206
4
{- | Module : ./OWL2/Conservativity.hs Copyright : (c) Dominik Luecke, 2008 License : GPLv2 or higher, see LICENSE.txt Maintainer : luecke@informatik.uni-bremen.de Stability : provisional Portability : non-portable This module implements conservativity checks for OWL 2.0 based on the the syntactic...
gnn/Hets
OWL2/Conservativity.hs
gpl-2.0
3,108
0
17
936
669
352
317
63
3
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS -Wall #-} module PreRenderable.TriangleLabel where import Math.Groups.S3 import PrettyUtil import THUtil import qualified Data.Map as M import HomogenousTuples import Data.AscTuples import Language.Haskell.TH.Lift import EitherC data TriangleLabel = TriangleLabel { ...
DanielSchuessler/hstri
PreRenderable/TriangleLabel.hs
gpl-3.0
2,905
0
13
903
525
304
221
55
1
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module Zoepis.ZScene where import Zoepis.ZParticles import Zoepis.ZGraphics import Zoepis.ZObject import Zoepis.ZVector hiding (scale) import Data.Map import Data.List (sortBy) import Graphics.Rendering.OpenGL import Graphics.Rendering.OpenGL.GL.CoordTrans impo...
abakst/Zoepis
Zoepis/ZScene.hs
gpl-3.0
2,704
1
18
752
911
470
441
77
4
-- | This module defines the syntax of MiniMiniLogo. It also provides -- functions to generate programs that draw some basic shapes. -- -- NOTE: You should not change the definitions in this file! -- module MiniMiniLogo where -- -- * Syntax -- -- | A program is a sequence of commands. type Prog = [Cmd] -- | The ...
caperren/Archives
OSU Coursework/CS 381 - Programming Language Fundamentals/Homework 3/MiniMiniLogo.hs
gpl-3.0
1,907
0
12
484
495
277
218
19
2
{-# LANGUAGE OverloadedStrings #-} module Slackware.Config ( Config(..) , configPath , parseConfig ) where import Data.YAML ( FromYAML , decode , withMap , parseYAML , (.:) ...
Dlackware/dlackware
lib/Slackware/Config.hs
gpl-3.0
1,540
0
17
463
382
215
167
39
4
{- This file is part of The Simple Nice Manual Generator. The Simple Nice Manual Generator 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 any later version...
elginer/snm
Data/Yaml/Simple.hs
gpl-3.0
1,842
0
11
437
345
187
158
30
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Main where import Control.Monad.IO.Class import Control.Exception (bracket) import Data.Aeson import...
Arguggi/PutData.hs
src/Main.hs
gpl-3.0
3,260
0
14
813
1,061
572
489
82
3
{- ============================================================================ | Copyright 2011 Matthew D. Steele <mdsteele@alum.mit.edu> | | | | This file is part of Fallback. | ...
mdsteele/fallback
src/DebugMain.hs
gpl-3.0
1,934
0
7
726
81
46
35
10
1
{-#LANGUAGE OverloadedStrings #-} module YoAPP where import qualified Data.ByteString as BS import Data.Monoid ((<>)) import Network.HTTP.Client newtype ApiToken = ApiToken { unApiToken :: BS.ByteString } sendYo :: ApiToken -> IO () sendYo token = withManager defaultManagerSettings $ \manager ->...
divarvel/yoapp-hs
YoApp.hs
gpl-3.0
622
0
13
166
158
87
71
15
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
source/Game/Run/Scene/Fancy/ShadeSceneKonami.hs
gpl-3.0
2,830
0
14
733
628
321
307
41
4
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dlp/gen/Network/Google/Resource/DLP/Projects/Locations/DeidentifyTemplates/List.hs
mpl-2.0
8,739
0
20
1,837
1,065
624
441
155
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
rueshyna/gogol
gogol-affiliates/gen/Network/Google/Resource/GAN/Advertisers/Get.hs
mpl-2.0
3,798
0
14
837
463
278
185
67
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-apps-calendar/gen/Network/Google/Resource/Calendar/Channels/Stop.hs
mpl-2.0
2,906
0
13
644
324
199
125
51
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DynamicTargetingKeys/Delete.hs
mpl-2.0
6,692
0
21
1,567
991
572
419
143
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators ...
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Disks/CreateSnapshot.hs
mpl-2.0
5,560
0
20
1,325
719
426
293
106
1
module Kata (highAndLow) where import Data.List.Split sp :: String -> [String] sp = splitOn " " get :: String -> [Int] get input = map read $ sp input :: [Int] highAndLow :: String -> String highAndLow = ap ((++) . show . maximum . get) ((' ' :) . show . minimum . get)
ice1000/OI-codes
codewars/101-200/highest-and-lowest.hs
agpl-3.0
274
0
10
59
126
71
55
8
1
-- Test Utils module UtilsSpec (main, spec) where import Utils import Test.Hspec import Test.QuickCheck main :: IO () main = hspec spec spec = do describe "parseCSV" $ do it "parseCSV returns list of lists of strings" $ do parseCSV "lorem,ipsum\ndolor,sit,amet\r\nconsectetur\n\radipiscing,elit\r" `should...
keni7385/hmlf
test/UtilsSpec.hs
lgpl-3.0
419
0
16
67
120
68
52
10
1
instance Functor IO where fmap f action = do result <- action return $ f result main = do line <- getLine let line' = reverse line putStrLn $ "You said " ++ line' ++ " backwards" putStrLn $ "Yes, you said " ++ line' ++ " backwards"
EricYT/Haskell
src/chapter-11-5.hs
apache-2.0
281
0
10
97
90
41
49
8
1
-- Hoff -- A gatekeeper for your commits -- Copyright 2016 Ruud van Asseldonk -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- A copy of the License has been included in the root of the repository. {-# LANGUAGE DeriveGeneric #-...
ruuda/hoff
src/Configuration.hs
apache-2.0
2,918
0
9
643
359
228
131
45
1
{-| Module : Pulsar.PathResolver Description : Resolve file system paths to absolute paths. Copyright : (c) Jesse Haber-Kucharsky, 2014 License : Apache-2.0 -} {-# LANGUAGE ScopedTypeVariables #-} module Pulsar.PathResolver (PathList ,pathList ,resolve ,directoryName ,withDirectory) where impo...
hakuch/Pulsar
src/Pulsar/PathResolver.hs
apache-2.0
2,842
0
14
885
685
345
340
61
3
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} -------------------------------------------------------------------- -- | -- Copyright : (c) Edward Kmett 2012 -- License : BSD3 -- Maintainer: Edward Kmett <ekmett@gmai...
ekmett/ermine
src/Ermine/Syntax.hs
bsd-2-clause
4,756
0
22
961
1,509
806
703
100
1
{-# LANGUAGE BangPatterns,RankNTypes #-} -- Simple tester for LDPC-lie things module ECC where import System.Random.MWC import Control.Monad.Primitive (PrimMonad, PrimState) import Control.Monad.Trans (MonadIO(liftIO)) type FrameSize = Int -- basic structure of an error-checking code data ECC m v w d x = ECC { ...
ku-fpg/ldpc-blob
src/ECC.hs
bsd-2-clause
3,361
6
14
1,000
1,294
658
636
77
2
module Data.CRF.Chain1.Dataset.Codec ( Codec , CodecM , obMax , lbMax , encodeWord'Cu , encodeWord'Cn , encodeSent'Cu , encodeSent'Cn , encodeSent , encodeWordL'Cu , encodeWordL'Cn , encodeSentL'Cu , encodeSentL'Cn , encodeSentL , decodeLabel , decodeLabels , mkCodec , encodeData , encodeDataL ) where import Cont...
kawu/crf-chain1
src/Data/CRF/Chain1/Dataset/Codec.hs
bsd-2-clause
11,611
4
16
2,637
1,929
1,078
851
101
3
module BuiltIn.Text (builtInText) where import Data.Char (toLower, toUpper, isAlpha) import Data.List (isPrefixOf) import qualified Data.Map as M import Data.Monoid ((<>)) import BuiltIn.Common import Type import Types -- TODO: -- MASKEDTEXT -- NUMBERFORMAT...
ahodgen/archer-calc
src/BuiltIn/Text.hs
bsd-2-clause
4,851
0
11
1,333
1,622
881
741
142
3
{-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} ------------------------------------------------------------------------------ module OpenArms.Types.Lang ( -- * Types Lang (..) , columnOffsetsLang , tableOfLang , ...
dmjio/openarms
src/OpenArms/Types/Lang.hs
bsd-2-clause
698
0
7
162
71
47
24
19
0
module Hint.InterpreterT ( InterpreterT, Interpreter, runInterpreter, runInterpreterWithArgs, runInterpreterWithTopDirAndArgs, MultipleInstancesNotAllowed(..) ) where import Prelude import Hint.Base import Hint.Context import Hint.Configuration import Hint.Extension import Control.Applicative import Co...
flowbox-public/hint
src/Hint/InterpreterT.hs
bsd-3-clause
9,815
0
17
2,772
1,801
952
849
134
2
{-# LANGUAGE GeneralizedNewtypeDeriving , TypeOperators , MultiParamTypeClasses , FlexibleInstances #-} {-| https://en.wikipedia.org/wiki/Metric_prefix -} module Ghazan.Magnitude where import Ghazan.Formula -- | e18 newtype Exa a = Exa {getExa :: a} deriving (Num, Eq, Ord, Show) instance Conver...
Cortlandd/ConversionFormulas
src/Ghazan/Magnitude.hs
bsd-3-clause
29,900
0
8
6,075
10,576
5,359
5,217
601
0
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE BangPatterns #-} module Data.MapReduce where import Prelude hiding (catch) import Control.DeepSeq import Control.Monad imp...
ozataman/simple-mapreduce
src/Data/MapReduce.hs
bsd-3-clause
11,127
1
27
3,003
3,612
1,764
1,848
-1
-1
{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE TemplateHaskell #-} module Test.IO.Mismi.SQS.Commands where import Control.Lens import Data.Maybe import Disorder.Core.IO import Mismi.SQS import Mismi.SQS.Amazonka hiding (createQueue, deleteMessage) import P...
ambiata/mismi
mismi-sqs/test/Test/IO/Mismi/SQS/Commands.hs
bsd-3-clause
3,448
0
15
773
1,149
572
577
75
1
-- | Pretty-printing types and coercions. module TyCoPpr ( -- * Precedence PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen, -- * Pretty-printing types pprType, pprParendType, pprTidiedType, pprPrecType, pprPrecTypeX, pprTypeApp, pprTCvBndr, pprTCvBndrs, ...
sdiehl/ghc
compiler/types/TyCoPpr.hs
bsd-3-clause
11,559
0
13
2,549
2,029
1,096
933
165
2
---------------------------------------------------------------------------- -- | -- Module : GHC.Stack.Ext -- Copyright : (c) Sergey Vinokurov 2018 -- License : BSD3-style (see LICENSE) -- Maintainer : serg.foo@gmail.com ---------------------------------------------------------------------------- {-# ...
sergv/tags-server
src/GHC/Stack/Ext.hs
bsd-3-clause
628
0
5
103
47
35
12
9
0
{-# LANGUAGE DeriveDataTypeable #-} ----------------------------------------------------------------------------- -- | -- Module : Security.InfoFlow.Policy.FlowLocks.GlobalPolicy -- Copyright : (c) Niklas Broberg 2013 -- License : BSD-style (see the file LICENSE.txt) -- -- Maintainer : Niklas Broberg, n...
niklasbroberg/flowlocks-framework
src/Security/InfoFlow/Policy/FlowLocks/GlobalPolicy.hs
bsd-3-clause
2,469
0
11
461
348
202
146
26
2
{-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE Rank2Types #-} ----------------------------------------------------------------------------- -- | -- Module : Data.Serialize.Get -- Copyright : Lennart Kolmodin, Galois Inc. 2009 -- License : BSD3-style (see LICENSE) -- -- Maintainer : Tr...
triplepointfive/cereal
src/Data/Serialize/Get.hs
bsd-3-clause
21,691
0
22
5,401
5,952
3,167
2,785
402
6
{-# LANGUAGE OverloadedStrings, RankNTypes #-} -- | It should be noted that most of the code snippets below depend on the -- OverloadedStrings language pragma. -- -- The functions in this module allow an arbitrary monad to be embedded -- in Scotty's monad transformer stack in order that Scotty be combined -- with other...
edofic/scotty
Web/Scotty/Trans.hs
bsd-3-clause
5,680
0
15
1,269
1,128
636
492
68
1
import Data.Aeson import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.Char8 as L8 import Data.Monoid import Data.Maybe import Data.Foldable hiding (mapM_) import Control.Monad (when) import System.IO (hPutStrLn, stderr) import System.Environment (getArgs) import System.Exit (exitFailure) im...
np/json-tools
json-strings.hs
bsd-3-clause
1,408
0
15
374
382
211
171
38
6
module Main where import Data.List (intersperse) import System.Environment (getArgs) -------------------------------------------------------------------------------- -- Tuples -------------------------------------------------------------------------------- u, tab, newline, sp :: ShowS u = showChar '_' ...
ekmett/generic-deriving
misc/Tuples.hs
bsd-3-clause
3,975
0
17
1,490
1,393
706
687
81
2
-- 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.Quantity.FR.Tests ( tests ) where import Data.String import Test.Tasty import Duckling.Dimensi...
facebookincubator/duckling
tests/Duckling/Quantity/FR/Tests.hs
bsd-3-clause
491
0
9
75
76
48
28
10
1
{-# LANGUAGE OverloadedStrings #-} -- | Handle prosper account data. -- -- 'acountHandler' sends account data to the client and also updates the database -- with Prosper data. -- -- 'prosperAccountController' checks on the status of various functions, including -- account data polling and also the NoteScript strategy....
WraithM/peertrader-backend
src/PeerTrader/Route/ProsperAccount.hs
bsd-3-clause
6,395
0
14
1,738
1,102
575
527
110
4
module LJRSS.LJConfig where import qualified Data.Map as DM import qualified Data.Set as DS import Data.Time (LocalTime) import System.Directory (getAppUserDataDirectory, doesFileExist) import Control.Monad (liftM) type UserSessions = DM.Map String LocalTime data TLJConfig = LJConfig { username, password :: String...
jdevelop/lj2rss
LJRSS/LJConfig.hs
bsd-3-clause
1,092
0
10
211
272
151
121
30
2
{-# LANGUAGE OverloadedStrings #-} module TwinkleBear.Lesson02 (main) where import Prelude hiding (init) import Control.Applicative import Control.Monad import Foreign.C.Types import Linear import Linear.Affine ( Point(P) ) import qualified SDL import Paths_sdl2 (getDataFileName) screenWidth, screenHeight :: CInt (...
svenkeidel/sdl2
examples/twinklebear/Lesson02.hs
bsd-3-clause
2,226
23
11
455
582
322
260
52
2
{-# LANGUAGE TupleSections, OverloadedStrings, QuasiQuotes, TemplateHaskell, TypeFamilies, RecordWildCards, DeriveGeneric ,MultiParamTypeClasses ,FlexibleInstances #-} module Protocol.ROC.PointTypes.PointType118 where import GHC.Generics import Data.Word import Data.Binary import Data.Binary.Get import ...
jqpeterson/roc-translator
src/Protocol/ROC/PointTypes/PointType118.hs
bsd-3-clause
23,729
0
9
9,572
2,145
1,179
966
479
1
-- | Wrappers to run various build tools needed. module BuildTools ( runCabal, runCabalResults, runGhcPkg ) where import Control.Concurrent import Control.Monad.State import Control.Exception import System.Exit (ExitCode(..)) import System.IO import System.Process import HackageMonad import Utils -- | Ru...
dterei/hackager
src/BuildTools.hs
bsd-3-clause
2,911
0
18
890
802
408
394
60
7
module ListZipper ( ListZipper (..) , forward , back ) where type ListZipper a = ([a], [a]) forward :: ListZipper a -> Maybe (ListZipper a) forward (ys, x : xs) = Just (x : ys, xs) forward _ = Nothing back :: ListZipper a -> Maybe (ListZipper a) back (y : ys, xs) = Just (ys, y : xs) back ...
saevarb/Brainfunk
ListZipper.hs
bsd-3-clause
377
0
8
139
158
88
70
11
1
{-# LANGUAGE Rank2Types #-} -- | Thin wrapper around `calculateSeed` used in LRC worker. module Pos.DB.Ssc.Logic.Global ( -- * Seed sscCalculateSeed ) where import Universum import Pos.Chain.Lrc (RichmenStakes) import Pos.Chain.Ssc (MonadSscMem, SscGlobalQ...
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Ssc/Logic/Global.hs
mit
1,975
0
13
483
328
189
139
38
1
{- Arch.hs: Architecture-specific information needed for stub generation. Part of Flounder: a message passing IDL for Barrelfish Copyright (c) 2007-2010, ETH Zurich. Copyright (c) 2015, Hewlett Packard Enterprise Development LP. All rights reserved. This file is distributed under the terms in the attach...
kishoredbn/barrelfish
tools/flounder/Arch.hs
mit
2,257
0
9
601
413
265
148
55
2
{-# OPTIONS_GHC -fno-warn-orphans #-} module Pos.Util.Example where import Universum import Data.Aeson (ToJSON) import qualified Data.Map.Strict as Map import Data.Swagger (Definitions, NamedSchema (..), Schema, sketchSchema) import Data.Swagger.Declare (De...
input-output-hk/pos-haskell-prototype
lib/src/Pos/Util/Example.hs
mit
1,798
0
12
417
470
258
212
-1
-1
{-# LANGUAGE ScopedTypeVariables #-} import Transient.Internals import Transient.Move.Internals import Transient.Indeterminism import Transient.Move.Utils import Transient.Logged import Transient.Move.Services import Transient.Move.Services.Executor import Control.Applicative import Control.Monad import Data.Typea...
transient-haskell/transient-universe
app/server/Transient/Move/Services/controlServices.hs
mit
10,868
0
27
3,968
2,626
1,219
1,407
220
3
module Main where -- identificar module com Main para o Criterion funcionar import BasicTypes hiding (Success,Fail) import Test.HUnit import FeatureModel.Types import FeatureModel.FMTypeChecker import FeatureModel.FCTypeChecker import FeatureModel.Analysis import FeatureModel.OBDD import qualified Criterion.Main as ...
hephaestus-pl/hephaestus
willian/hephaestus-integrated/feature-modeling/testsuite/tests/FeatureModelTests.hs
mit
5,913
68
15
769
1,801
977
824
94
1
module Parser.Parse (ParseError ,Parse ,parseFailure ,consume1 ,endOfSequence ,parseEither ,runParse ,greedy ,choice ,lit ,litCond ,lits ,litRange ,many ,many1 ,greedyMany ,greedyMany1 ,reluctantMany ,reluctantMany1 ,optional ,reluctantOptional ,delimited ,delimited1 ,chainNest ,space ,par...
Kiwi-Labs/kwirc
kwick/parser/Parse.hs
mit
5,500
22
16
1,201
2,461
1,232
1,229
187
4
--- * -*- outline-regexp:"--- \\*"; -*- --- ** doc -- In Emacs, use TAB on lines beginning with "-- *" to collapse/expand sections. {-| A reader for the "timedot" file format. Example: @ ;DATE ;ACCT DOTS # Each dot represents 15m, spaces are ignored ;ACCT 8 # numbers with or without a following h represent hour...
adept/hledger
hledger-lib/Hledger/Read/TimedotReader.hs
gpl-3.0
7,580
0
18
1,659
1,491
807
684
127
3
{-#LANGUAGE GADTs, TypeOperators, ScopedTypeVariables, ExplicitForAll, RankNTypes, MultiParamTypeClasses, FlexibleContexts, PatternSynonyms #-} module Carnap.Core.Unification.ACUI ( ACUI(..), acuiUnifySys --acuiUnify, ACUI(..) ) where --to solve ACUI unification with constants we need to be able to find --all...
opentower/carnap
Carnap/src/Carnap/Core/Unification/ACUI.hs
gpl-3.0
7,992
0
20
2,288
2,912
1,473
1,439
133
4
{-# 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-ec2/gen/Network/AWS/EC2/CancelConversionTask.hs
mpl-2.0
4,694
0
11
877
531
323
208
70
1
module Main where import GHC.Conc import Control.Exception -- Test invariants using multiple TVars main = do putStr "\nStarting\n" (x1, x2, x3) <- atomically ( do x1 <- newTVar 0 x2 <- newTVar 0 x3 <- newTVar 0 ...
gridaphobe/packages-stm
tests/stm062.hs
bsd-3-clause
1,389
0
18
556
428
201
227
29
3
module Main where import Distribution.Dev.Interactive import System.Environment import System.Process opt0 opt args = f [] args where f r (x:xs) | x == ("--cabal-ghci-" ++ opt) = (reverse r ++ xs, True) | otherwise = f (x:r) xs f _ _ = (args, False) main = do args ← get...
eigengrau/cabal-ghci
CabalGHCI.hs
bsd-3-clause
869
0
14
260
260
127
133
-1
-1
{-# LANGUAGE Haskell2010 #-} {-# LINE 1 "Data/Primitive/SmallArray.hs" #-} {-# LANGUAGE CPP #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE DeriveDa...
phischu/fragnix
tests/packages/scotty/Data.Primitive.SmallArray.hs
bsd-3-clause
16,779
0
20
4,280
4,903
2,511
2,392
373
1
module Slantbot.Algolia where import Algolia.Query import Algolia.Response import Data.Aeson import Data.Char import Data.Maybe import Data.Text (Text) questionSearch :: AlgoliaProfile -> String -> IO (Maybe Question) questionSearch _ []...
Andrew-the-Ubergeek/slantbot
src/Slantbot/Algolia.hs
mit
1,635
0
14
491
512
281
231
60
2
-- -- Copyright (c) 2012 Citrix Systems, Inc. -- -- 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 progra...
jean-edouard/manager
storehouse/StoreHouse/VHD/Util.hs
gpl-2.0
3,561
0
15
862
759
406
353
72
2
{-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude, MagicHash, StandaloneDeriving, BangPatterns, KindSignatures, DataKinds, ConstraintKinds, MultiParamTypeClasses, FunctionalDependencies #-} {-# LANGUAGE AllowAmbiguousTypes #-} -- ip :: IP x a => a is strictly speaking ambiguous, ...
fmthoma/ghc
libraries/ghc-prim/GHC/Classes.hs
bsd-3-clause
13,686
2
12
4,429
5,776
3,273
2,503
-1
-1
{-# LANGUAGE OverloadedStrings #-} {- Copyright (C) 2007-2015 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) a...
fibsifan/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
19,949
0
22
6,259
5,461
2,717
2,744
396
26
{- | Module : $Id$ Description : test some parsers (and printers) for annotations Copyright : (c) Christian Maeder, Uni Bremen 2002-2005 License : GPLv2 or higher, see LICENSE.txt Maintainer : Christian.Maeder@dfki.de Stability : experimental Portability : portable test some parsers (and printers...
keithodulaigh/Hets
Common/annos.hs
gpl-2.0
1,069
0
13
201
247
140
107
24
1
{-# LANGUAGE DataKinds #-} {-# LANGUAGE EmptyCase #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wincomplete-patterns #-} module Bug where import Data.Kind (Type) import Data.Type.Equality ((:~:)(..)) import Data.Void (Void...
sdiehl/ghc
testsuite/tests/pmcheck/should_compile/T15753c.hs
bsd-3-clause
1,103
0
9
276
425
239
186
41
1
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Config.Lens -- License : GPL-2 -- Maintainer : yi-devel@googlegroups.com -- Stability : experimental -- Portability : portable -- -- Lenses for types exported in Yi.Config. This module serves as a -- convenien...
siddhanathan/yi
yi-core/src/Yi/Config/Lens.hs
gpl-2.0
793
0
6
146
140
84
56
12
1
module AutoSize where import GHC.Base data List a = N | Cons a (List a) nil = N cons = Cons foo :: List a -> Int foo N = 0 foo (Cons x xs) = 1 + foo xs data Exp = EConst Int | EBinOp Int Exp Exp expSize :: Exp -> Int expSize (EConst _) = 0 expSize e@(EBinOp _ e1 e2) = 1 + (expSize e) + (expSize e2)
mightymoose/liquidhaskell
tests/neg/AutoSize.hs
bsd-3-clause
314
0
8
87
165
88
77
12
1
module Conflict2 where f :: Int -> Int f x = x + 1 f1 :: Int -> Int f1 x = x - 1 f3 :: Int -> (Int, Int) f3 x y = (x + 1, y - 1)
SAdams601/HaRe
old/testing/merging/Conflict2_TokOut.hs
bsd-3-clause
133
0
6
45
85
47
38
7
1
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} -- | @futhark repl@ module Futhark.CLI.REPL (main) where import Control.Exception import Control.Monad import Control.Monad.Except import C...
HIPERFIT/futhark
src/Futhark/CLI/REPL.hs
isc
18,048
0
25
5,149
5,131
2,616
2,515
-1
-1
-- @author Alexandre Lucchesi -- -- This module illustrates the creation of a Custom feature. -- -- Basically, one must import the module 'Types' and make the custom -- feature an instance of SimplifiedFeature typeclass. module BasicFeature where import FeatureModel.NewTypes.Types -- Custom feature definition. -- ...
hephaestus-pl/hephaestus
alexandre/feature-modeling/samples/newTypes/BasicFeature.hs
mit
1,517
0
10
526
252
143
109
29
0
{-# LANGUAGE Rank2Types #-} module Game.BoardTrump.Util where import qualified Haste.Perch as P import Haste (alert, Elem, toJSString, Event(OnClick), evtName, setTimeout) import Haste.Foreign (ffi) import Lens.Family2 import Lens.Family2.Unchecked (lens) tagName :: Elem -> IO String tagName = ffi $ toJSString "(func...
ayu-mushi/new-trump-game
Game/BoardTrump/Util.hs
mit
2,251
0
13
522
845
430
415
-1
-1
module Auxiliars where import qualified Data.ByteString as Bs import qualified Data.Word as W char2word8 :: Char -> W.Word8 char2word8 ch = fromIntegral (fromEnum ch) word82char :: W.Word8 -> Char word82char w8 = toEnum $ fromIntegral w8 -- | Parses an unsigned Int from Word8's in little endian. parseInt :: [W.Word...
Autopawn/haskell-secureUDP
Auxiliars.hs
mit
1,102
0
12
232
383
205
178
23
2
{-| Module: Flaw.Editor.EditableEntity Description: Class for defining layout to edit entities. License: MIT -} {-# LANGUAGE DefaultSignatures, FlexibleContexts, FlexibleInstances, OverloadedStrings, RankNTypes, TemplateHaskell, TypeFamilies, TypeOperators #-} module Flaw.Editor.EditableEntity ( EditableLayoutState...
quyse/flaw
flaw-editor/Flaw/Editor/EditableEntity.hs
mit
7,121
11
17
1,232
1,712
880
832
101
3
-- Problems/Problem044Spec.hs module Problems.Problem044Spec (main, spec) where import Test.Hspec import Problems.Problem044 main :: IO() main = hspec spec spec :: Spec spec = describe "Problem 44" $ it "Should evaluate to 5482660" $ p44 `shouldBe` 5482660
Sgoettschkes/learning
haskell/ProjectEuler/tests/Problems/Problem044Spec.hs
mit
273
0
8
52
73
41
32
9
1
{-# LANGUAGE CPP #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TemplateHaskell #-} module Settings.Worker where import ClassyPrelude import Data.Aeson import Database.Persist.Postgresql (PostgresConf) -- | Settings for the w...
rgrempel/frelm.org
src/Settings/Worker.hs
mit
611
0
11
135
93
54
39
16
0