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 BangPatterns, OverloadedStrings #-}
module Main where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Data.Aeson
import Data.Configurator
import Data.Int
import Data.Text (Text)
import Data.Pool
import Database.MySQL.Simple
... | Ocramius/FrameworkBenchmarks | snap/bench/src/Main.hs | bsd-3-clause | 2,839 | 0 | 13 | 739 | 928 | 475 | 453 | 79 | 1 |
module Example.InitFunction () where
| smurphy8/refactor-patternmatch-with-lens | src/Example/InitFunction.hs | bsd-3-clause | 38 | 0 | 3 | 5 | 9 | 6 | 3 | 1 | 0 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Meadowstalk.Model
where
import Data.ByteStrin... | HalfWayMan/meadowstalk | src/Meadowstalk/Model.hs | bsd-3-clause | 685 | 0 | 8 | 124 | 95 | 57 | 38 | 16 | 0 |
{-|
Module: Data.Astro.Time.GregorianCalendar
Description: Gregorian Calendar
Copyright: Alexander Ignatyev, 2016
Gregorian Calendar was introduced by Pope Gregory XIII.
He abolished the days 1582-10-05 to 1582-10-14 inclusive to bring back civil and tropical years back to line.
-}
module Data.Astro.Time.GregorianCa... | Alexander-Ignatyev/astro | src/Data/Astro/Time/GregorianCalendar.hs | bsd-3-clause | 2,256 | 0 | 16 | 585 | 788 | 443 | 345 | 55 | 3 |
{-# OPTIONS_GHC -F -pgmF hspec-discover -optF --module-name=Spec #-} | rimmington/haskell-continuous | test/Spec.hs | cc0-1.0 | 68 | 0 | 2 | 7 | 3 | 2 | 1 | 1 | 0 |
<?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="fr-FR">
<title>Sequence Scanner | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<m... | veggiespam/zap-extensions | addOns/sequence/src/main/javahelp/org/zaproxy/zap/extension/sequence/resources/help_fr_FR/helpset_fr_FR.hs | apache-2.0 | 978 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
--------------------------------------------------------------------------------
-- |
-- Module : Data.Comp.Multi.Derive.Ordering
-- Copyright : (c) 2011 Patrick Bahr, Tom Hvitved
-- License : BS... | spacekitteh/compdata | src/Data/Comp/Multi/Derive/Ordering.hs | bsd-3-clause | 3,145 | 0 | 14 | 915 | 926 | 494 | 432 | 56 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE PackageImports #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE RankNTypes #-}
{-# LANG... | AndreasPK/stack | src/Network/HTTP/Download/Verified.hs | bsd-3-clause | 12,138 | 0 | 20 | 3,231 | 2,377 | 1,262 | 1,115 | -1 | -1 |
{-# LANGUAGE OverloadedStrings , QuasiQuotes , PackageImports #-}
-- This module defines the main function to handle the messages that comes from users (web or device users).
module Handlers
( handleMessage
, parsMessage
, setMessageValue
) where
import Database.Persist.Postgresql
import Data.Aeson.Ty... | MarcosPividori/GSoC-Communicating-with-mobile-devices | test/Connect4/Yesod-App/Handlers.hs | mit | 7,678 | 0 | 33 | 3,570 | 1,934 | 970 | 964 | 143 | 20 |
{- |
Module : $Header$
Description : after parsing XML message a list of XMLcommands is produced,
containing commands that need to be executed
Copyright : uni-bremen and DFKI
License : GPLv2 or higher, see LICENSE.txt
Maintainer : [email protected]
Stability : provisional
Portab... | keithodulaigh/Hets | PGIP/XMLstate.hs | gpl-2.0 | 9,135 | 0 | 21 | 2,234 | 2,207 | 1,127 | 1,080 | 195 | 23 |
{-# LANGUAGE CPP
, DataKinds
, PolyKinds
, GADTs
, TypeOperators
, TypeFamilies
, ExistentialQuantification
#-}
{-# OPTIONS_GHC -Wall -fwarn-tabs #-}
----------------------------------------------------------------
-- ... | zaxtax/hakaru | haskell/Language/Hakaru/Syntax/DatumABT.hs | bsd-3-clause | 1,538 | 0 | 11 | 344 | 202 | 116 | 86 | 25 | 1 |
{-# LANGUAGE CPP, MagicHash #-}
-- | Dynamically lookup up values from modules and loading them.
module ETA.Main.DynamicLoading (
#ifdef GHCI
-- * Loading plugins
loadPlugins,
-- * Force loading information
forceLoadModuleInterfaces,
forceLoadNameModuleInterface,
forceL... | alexander-at-github/eta | compiler/ETA/Main/DynamicLoading.hs | bsd-3-clause | 11,076 | 0 | 26 | 2,946 | 2,065 | 1,085 | 980 | 2 | 0 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE CPP
, MagicHash
, UnboxedTuples
, ScopedTypeVariables
#-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-deprecations #-}
-- kludge for the Control.Concurrent.QSem, Control.Concurrent.QSemN
-- and Control.Concurrent.Sam... | jwiegley/ghc-release | libraries/base/Control/Concurrent.hs | gpl-3.0 | 24,699 | 0 | 21 | 6,017 | 1,962 | 1,040 | 922 | 133 | 3 |
<?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="sk-SK">
<title>Advanced SQLInjection Scanner</title>
<maps>
<homeID>sqliplugin</homeID>
... | thc202/zap-extensions | addOns/sqliplugin/src/main/javahelp/help_sk_SK/helpset_sk_SK.hs | apache-2.0 | 981 | 77 | 66 | 157 | 409 | 207 | 202 | -1 | -1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="it-IT">
<title>Access Control Testing | ZAP Extension</title>
<maps>
<homeID>top</homeID>
... | kingthorin/zap-extensions | addOns/accessControl/src/main/javahelp/org/zaproxy/zap/extension/accessControl/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 776 | 63 | 53 | 120 | 337 | 170 | 167 | -1 | -1 |
{-# LANGUAGE GADTs, KindSignatures, PatternSynonyms #-}
module ShouldCompile where
import Data.Kind (Type)
data X :: (Type -> Type) -> Type -> Type where
Y :: f a -> X f (Maybe a)
pattern C :: a -> X Maybe (Maybe a)
pattern C x = Y (Just x)
| sdiehl/ghc | testsuite/tests/patsyn/should_compile/T8968-1.hs | bsd-3-clause | 247 | 0 | 9 | 54 | 102 | 54 | 48 | -1 | -1 |
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE RankNTypes #-}
module T12918b where
class Foo1 a where
-- These ones should be rejected
bar1 :: a -> b
default bar1 :: b -> a
bar1 = undefined
bar2 :: a -> b
default bar2 :: x
bar2 = undefined
bar3 :: a -> b
default bar3 :: a -... | ezyang/ghc | testsuite/tests/typecheck/should_fail/T12918b.hs | bsd-3-clause | 728 | 0 | 10 | 255 | 236 | 135 | 101 | 25 | 0 |
{-# LANGUAGE FlexibleContexts #-}
module FailDueToGivenOverlapping where
class C a where
class D a where
dop :: a -> ()
instance C a => D [a]
-- should succeed since we can't learn anything more for 'a'
foo :: (C a, D [Int]) => a -> ()
foo x = dop [x]
class E a where
eop :: a -> ()
instance E [a] where
eop ... | ezyang/ghc | testsuite/tests/typecheck/should_fail/FailDueToGivenOverlapping.hs | bsd-3-clause | 492 | 0 | 8 | 113 | 170 | 90 | 80 | -1 | -1 |
module Level1 where
(..--) = undefined :: ()
(..-+) = undefined :: ()
(..++) = undefined :: ()
| olsner/ghc | testsuite/tests/ghci/prog017/Level1.hs | bsd-3-clause | 96 | 0 | 5 | 19 | 40 | 27 | 13 | 4 | 1 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude #-}
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.StablePtr
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer... | tolysz/prepare-ghcjs | spec-lts8/base/Foreign/StablePtr.hs | bsd-3-clause | 1,520 | 0 | 4 | 323 | 64 | 53 | 11 | 11 | 0 |
module Song where
import Data.List (intercalate)
import Data.Char (toUpper, toLower)
song n =
if n == 0 then ""
else song (n-1) ++ "\n" ++ verse n
verse n = line1 n ++ line2 n ++ line3 n ++ line4 n
numToString :: Int -> String
numToString 1 = "one"
numToString 2 = "two"
numToString 3 = "three"
numToStr... | dirkz/Thinking_Functionally_With_Haskell | 1/Song.hs | isc | 988 | 0 | 10 | 244 | 426 | 213 | 213 | 37 | 2 |
{-# Language ScopedTypeVariables, OverloadedStrings #-}
module Unison.UnisonFile where
import qualified Data.Foldable as Foldable
import Data.Bifunctor (second)
import Data.Map (Map)
import qualified Data.Map as Map
import Unison.Reference (Reference)
import Unison.DataDeclaration (DataDeclaration, DataDeclaration')
... | paulp/unison | parser-typechecker/src/Unison/UnisonFile.hs | mit | 4,770 | 0 | 15 | 1,025 | 1,276 | 710 | 566 | 81 | 2 |
-- Copyright 2015-2016 Yury Gribov
--
-- Use of this source code is governed by MIT license that can be
-- found in the LICENSE.txt file.
import qualified System.Environment
import qualified System.Random
import qualified System.Exit
import qualified Data.Maybe
import qualified Board
import qualified Support
usage ... | yugr/sudoku | src/GenRand.hs | mit | 1,583 | 0 | 15 | 374 | 490 | 257 | 233 | 39 | 5 |
module Pitch.Network.Proxy (runProxy)
where
import Pitch.Network
import Pitch.Players
import Pitch.Players.Network
import Pitch.Game
import Pitch.Card
import Control.Concurrent
import Control.Monad
import Data.Aeson
import Network.HTTP
import Network.URI
import Network.HTTP.Base
import System.Environmen... | benweitzman/Pitch | src/Pitch/Network/Proxy.hs | mit | 2,978 | 11 | 13 | 1,406 | 674 | 354 | 320 | 56 | 4 |
main = putStrLn "Hello, Haskell"
| JordanRobinson/seven_languages | Haskell/SevenLang/src/Main.hs | mit | 33 | 1 | 4 | 5 | 12 | 4 | 8 | 1 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module CommandParser where
import Data.Attoparsec.ByteString.Char8
import Data.Attoparsec.Combinator
import qualified Data.Text.Lazy as L
import Data.Text.Encoding
import Control.Applicative
data Command = Retrieve | Delete | New deriving Show
parseCommand :: Parser C... | svdberg/thrift-haskell | CommandParser.hs | mit | 827 | 0 | 10 | 170 | 214 | 118 | 96 | 23 | 1 |
module Server.Packet
( -- * Pipes
PacketParseException (..)
, decoder
, encoder
-- * Handshake
, InboundPacketHandshake (..)
, getInPacketHandshake
, OutboundPacketHandshake (..)
, putOutPacketHandshake
-- * Login
, InboundPacketLogin (..)
, getInPacketLogin
... | kvanberendonck/pipes-server-template | src/Server/Packet.hs | mit | 3,418 | 1 | 21 | 788 | 797 | 418 | 379 | 87 | 3 |
{-# LANGUAGE BangPatterns, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-full-laziness -funbox-strict-fields #-}
module LRUBoundedMap ( Map
, empty
, toList
, null
, size
, member
, notMember
... | blitzcode/jacky | src/LRUBoundedMap.hs | mit | 22,902 | 8 | 23 | 10,607 | 6,529 | 3,396 | 3,133 | 386 | 15 |
module Nilsson where
import Control.DeepSeq
type Capacity = Int
type Length = Int
type Weight = Int
type Value = Int
type Path = [Int]
-- ********************* MCSP Main Functions ******************************
-- ~~~~~~~~~~ Lazy, non path tracking
nch :: [(Capacity, Length)] -> [(Capacity, Lengt... | jcsaenzcarrasco/MPhil-thesis | Nilsson.hs | mit | 12,291 | 6 | 15 | 4,565 | 5,970 | 3,243 | 2,727 | 222 | 6 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module IAFinance.Environment.Network(
Has,
EnvNetwork,
Network(..),
Manager,
get
) where
-----------------------------------------------------------------------------
-- import
import Contr... | wiryls/HomeworkCollectionOfMYLS | 2018.ProjectV/src/IAFinance/Environment/Network.hs | mit | 880 | 0 | 8 | 122 | 209 | 129 | 80 | 20 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fplugin=HListPlugin #-}
module Main where
import HList
import Data.Coerce
newtype C = C Char deriving Eq
main = print
[coerce HNil == HNil
-- This one doesn't work: ghc does not seem to... | aavogt/HListPlugin | ex/Coerce.hs | mit | 746 | 0 | 10 | 177 | 105 | 66 | 39 | 13 | 1 |
{-# LANGUAGE FlexibleInstances #-}
module System.Console.CmdArgs.AAI
( Desc
, AAI (..)
, aai
, branch
, param
, flag
, section
) where
import Control.Applicative
import Control.Monad (join)
import Data.CanDefault
import ... | aka-bash0r/AAI | src/System/Console/CmdArgs/AAI.hs | mit | 3,220 | 22 | 20 | 1,039 | 1,568 | 871 | 697 | 87 | 6 |
module Tests where
import qualified Graphics.Bezier.Tests
main :: IO ()
main = Graphics.Bezier.Tests.main
| AaronShiny/Bezier | tests/Tests.hs | gpl-2.0 | 108 | 0 | 6 | 15 | 30 | 19 | 11 | 4 | 1 |
module Pipes.LHCO where
import qualified Codec.Zlib as Zlib
import qualified Data.Text as T
import Pipes
import Pipes.Attoparsec as PA
import Pipes.ByteString as PB
import qualified Pipes.Parse as PP
import qualified Pipes.Zlib as PZ
--
import HEP.Parser.LHCOAnalysis.PhysObj
import HEP.Pa... | wavewave/lhc-analysis-collection | heavyhiggs/Pipes/LHCO.hs | gpl-3.0 | 590 | 0 | 12 | 106 | 176 | 105 | 71 | 13 | 1 |
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
module QHaskell.Expression.Conversions.Evaluation.ADTUntypedDebruijn
() where
import QHaskell.MyPrelude
import QHaskell.Expression.ADTUntypedDebruijn
import qualified QHaskell.Expression.ADTValue as FAV
import QHaskell.Environment.Plain
import QHaskell.Conversi... | shayan-najd/QHaskell | QHaskell/Expression/Conversions/Evaluation/ADTUntypedDebruijn.hs | gpl-3.0 | 871 | 0 | 20 | 251 | 273 | 157 | 116 | -1 | -1 |
-- grid is a game written in Haskell
-- Copyright (C) 2018 [email protected]
--
-- 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/LevelPuzzle/LevelPuzzleWorld/OutputState/Fancy.hs | gpl-3.0 | 1,668 | 0 | 9 | 461 | 194 | 126 | 68 | 46 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module TB.Crypto.Hash.Examples (
sha1File
) where
import Control.Applicative
import Control.Monad
import Crypto.Hash.SHA1
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import Data.Char
import ... | adarqui/ToyBox | haskell/vincenthz/cryptohash/src/TB/Crypto/Hash/Examples.hs | gpl-3.0 | 632 | 0 | 11 | 168 | 148 | 88 | 60 | 15 | 1 |
module Lex
( uncomment
, isDel
, isAlphanum', updown
, myLex
)
where
import Char
--------------------------------------------------------
uncomment :: String -> String
uncomment [] = []
uncomment ('-' : '-' : cs) = uncomment (dropWhile (/= '\n') cs)
uncomment ('{' : '-' : cs) = recomment cs
uncomment (c : cs)... | jwaldmann/rx | src/Lex.hs | gpl-3.0 | 1,571 | 8 | 14 | 357 | 687 | 350 | 337 | 41 | 1 |
module PolicyEffects.Init (
createPolicyEffects,
policyEffectsEnvReplicator
) where
import PolicyEffects.Model
import PolicyEffects.Agent
import FRP.Yampa
import FRP.FrABS
import System.Random
import Control.Monad.Random
createPolicyEffects :: Double
-> NetworkType
... | thalerjonathan/phd | coding/libraries/chimera/examples/ABS/PolicyEffects/Init.hs | gpl-3.0 | 1,562 | 0 | 10 | 436 | 273 | 145 | 128 | 34 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module WebParsing.TimeConverter (makeTimeSlots) where
import qualified Data.Text as T
--converts days into numbers, returns a tuple of the rest of the string (the times)
--and a list of number representations of days
convertTime :: (T.Text, [Double]) -> (T.Text, [Double])
convertTi... | cchens/courseography | hs/WebParsing/TimeConverter.hs | gpl-3.0 | 2,201 | 0 | 14 | 509 | 800 | 425 | 375 | 44 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-compute/gen/Network/Google/Resource/Compute/TargetSSLProxies/SetProxyHeader.hs | mpl-2.0 | 4,445 | 0 | 17 | 998 | 472 | 281 | 191 | 82 | 1 |
module Iface (interfaceResource) where
import Control.Monad
import Control.Applicative
import Control.Monad.Trans.Writer
import Control.Exception
import Data.Char
import Data.Bool
import Data.Maybe
import Data.IP
import System.Directory
import System.Process hiding (system, rawSystem)
import System.FilePath
import Sys... | DanielG/kvm-in-a-box | src/Iface.hs | agpl-3.0 | 5,563 | 0 | 18 | 1,243 | 1,860 | 1,000 | 860 | -1 | -1 |
{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------------------
{-| Module : ParseC
Copyright : (c) Daan Leijen 2003
License : BSD-style
Maintainer : [email protected]
Stability : provisional
Portability : portab... | sherwoodwang/wxHaskell | wxdirect/src/ParseC.hs | lgpl-2.1 | 12,580 | 0 | 51 | 3,300 | 3,722 | 1,782 | 1,940 | 280 | 3 |
{-# LANGUAGE OverloadedStrings, NamedFieldPuns, CPP #-}
module FormStructure.Chapter0 (ch0GeneralInformation) where
#ifndef __HASTE__
--import Data.Text.Lazy (Text)
#endif
import FormEngine.FormItem
import FormStructure.Common
import qualified FormStructure.Countries as Countries
ch0Ge... | DataStewardshipPortal/ds-elixir-cz | FormStructure/Chapter0.hs | apache-2.0 | 2,909 | 0 | 14 | 1,464 | 396 | 242 | 154 | 52 | 1 |
-- {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-
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
... | pranjaltale16/codeworld | funblocks-client/src/Main.hs | apache-2.0 | 6,083 | 24 | 16 | 1,415 | 1,362 | 679 | 683 | 133 | 3 |
{-# LANGUAGE ConstraintKinds #-}
-----------------------------------------------------------------------------
-- |
-- Module : Network.IP
-- Copyright : (C) 2015 Ricky Elrod
-- License : BSD2 (see LICENSE file)
-- Maintainer : Ricky Elrod <[email protected]>
-- Stability : experimental
-- Portability : portable
--
-- Thi... | relrod/ip | src/Network/IP.hs | bsd-2-clause | 1,021 | 0 | 5 | 119 | 42 | 35 | 7 | 4 | 0 |
module STLCCheck (
check,
checkTop,
TypeError(..)
) where
import STLCSyntax
import Control.Monad.Except
import Control.Monad.Reader
type Env = [(Name, Type)]
extend :: (Name, Type) -> Env -> Env
extend = (:)
data TypeError
= Mismatch Type Type
| NotFunction Type
| NotInScope Name
type Check = ExceptT T... | toonn/wyah | src/STLCCheck.hs | bsd-2-clause | 1,350 | 0 | 16 | 477 | 522 | 261 | 261 | 42 | 6 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE FlexibleContexts, FlexibleInstances #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeSyno... | pepeiborra/narradar | src/Narradar/Constraints/SAT/Solve.hs | bsd-3-clause | 11,835 | 0 | 19 | 3,405 | 3,747 | 2,005 | 1,742 | 200 | 2 |
{-# LANGUAGE TupleSections #-}
module Haskell99Pointfree.P10
( p10_1, p10_2
) where
import Control.Applicative
import Control.Monad
import Data.List (genericLength, group)
import Haskell99Pointfree.P09
import Control.Arrow
p10_1 :: Eq a => [a] -> [(Integer,a)]
p10_1 = map (liftA2 (,) genericLength head) . ... | SvenWille/Haskell99Pointfree | src/Haskell99Pointfree/P10.hs | bsd-3-clause | 971 | 2 | 15 | 195 | 427 | 244 | 183 | 18 | 1 |
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ... | robstewart57/stack | src/Stack/Types/Config.hs | bsd-3-clause | 49,239 | 0 | 17 | 12,020 | 9,700 | 5,160 | 4,540 | 1,043 | 6 |
{-# LANGUAGE OverloadedStrings #-}
module Trurl where
import System.Directory
import System.FilePath
import Network.HTTP.Conduit
import Codec.Archive.Tar
import Data.List hiding (find)
import Text.Hastache
import Text.Hastache.Aeson
import Data.Aeson
import Data.String.Utils
import System.FilePath.Find (find, always,... | DNNX/trurl | src/Trurl.hs | bsd-3-clause | 6,428 | 0 | 12 | 916 | 1,293 | 662 | 631 | 108 | 2 |
module Module4.Task3 where
data Color = Red | Green | Blue deriving (Show, Read)
stringToColor :: String -> Color
stringToColor = read
| dstarcev/stepic-haskell | src/Module4/Task3.hs | bsd-3-clause | 143 | 0 | 6 | 30 | 44 | 26 | 18 | 4 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeFamilies #-}
module ... | zerobuzz/servant | servant-docs/src/Servant/Docs/Internal/Pretty.hs | bsd-3-clause | 1,606 | 0 | 8 | 439 | 444 | 240 | 204 | -1 | -1 |
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveDataTypeable #-}
module Sudoku.Cell (Cell(..)) where
import Prelude hiding ((&&), (||), not, and, or, all, any)
import Data.Typeable (Typeable)
import Data.Word
import Ersatz
import GHC.Generics
newtype Cell = Cell Bit4
deriving (Show... | msakai/ersatz-toysat | examples/sudoku/Sudoku/Cell.hs | bsd-3-clause | 623 | 0 | 11 | 124 | 211 | 116 | 95 | 19 | 0 |
module DotRace.FFI.Raw where
import FFI
import FFI.Types
import SharedTypes (Track, readI)
import Data.Text (Text)
readTrackData :: Fay Text
readTrackData = ffi "$('#track')['val']()"
parseTrackData :: Text -> Fay Track
parseTrackData = ffi "JSON['parse'](%1)"
addWindowEvent :: Text -> (Event -> Fay ()) -> Fay ()
... | lubomir/dot-race | fay/DotRace/FFI/Raw.hs | bsd-3-clause | 3,203 | 0 | 11 | 447 | 850 | 435 | 415 | 79 | 1 |
module IO.Arrays
(
zip4,
unzip4,
fromImageToRepa,
fromRepaToImage,
RGBA8
) where
import System.Environment
import Control.Monad
import Data.Array.Repa as Repa
import Codec.Picture
import Data.Array.Repa.Stencil
import Data.Array.Repa.Stencil.Dim2
import Filters.Types
-- |
-- Like zip, but ... | MajronMan/Himage | src/IO/Arrays.hs | bsd-3-clause | 1,809 | 0 | 15 | 474 | 758 | 419 | 339 | 46 | 1 |
{-# LANGUAGE ForeignFunctionInterface, TypeFamilies, FlexibleInstances,
MultiParamTypeClasses, OverloadedStrings, Rank2Types #-}
module FRP.Sodium.GameEngine2D.GLUT where
import FRP.Sodium.GameEngine2D.Cache
import FRP.Sodium.GameEngine2D.CommonAL (SoundInfo(..))
import qualified FRP.Sodium.GameEngine2D.Common... | the-real-blackh/sodium-2d-game-engine | FRP/Sodium/GameEngine2D/GLUT.hs | bsd-3-clause | 15,215 | 6 | 30 | 5,426 | 4,411 | 2,256 | 2,155 | 293 | 5 |
module SMACCMPilot.GCS.Gateway.Queue
( QueueInput
, QueueOutput
, newQueue
, queuePop
, queuePush
) where
import Control.Monad
import Control.Concurrent.STM
newtype QueueInput a = QueueInput { unQueueInput :: TQueue a }
newtype QueueOutput a = QueueOutput { unQueueOutput :: TQueue a }
newQueue :: IO (Que... | GaloisInc/smaccmpilot-gcs-gateway | SMACCMPilot/GCS/Gateway/Queue.hs | bsd-3-clause | 616 | 0 | 11 | 110 | 211 | 115 | 96 | 16 | 1 |
{-# LANGUAGE RankNTypes, GADTs #-}
module QueryArrow.RPC.Service where
import QueryArrow.Semantics.TypeChecker
import QueryArrow.Syntax.Type
import QueryArrow.DB.DB
import Data.Aeson
class RPCService a where
startService :: a -> AbstractDatabase MapResultRow FormulaT -> Value -> IO ()
data AbstractRPCService = fo... | xu-hao/QueryArrow | QueryArrow-rpc-common/src/QueryArrow/RPC/Service.hs | bsd-3-clause | 366 | 0 | 11 | 49 | 88 | 49 | 39 | -1 | -1 |
{-# LANGUAGE DeriveGeneric #-}
module S1Messages
( S1ApMessage (..)
, encode
, decode
, EpsAttach (..)
, S1MessageType (..)
, LastMessage (..)
) where
import Data.Binary
import Data.Binary.Put
import Data.Binary.Get
import GHC.Generics
import qualified Data.ByteStrin... | Ilydocus/frp-prototype | src/S1Messages.hs | bsd-3-clause | 2,375 | 2 | 16 | 754 | 598 | 317 | 281 | 83 | 0 |
{-# LANGUAGE OverloadedStrings, DeriveGeneric, DeriveAnyClass #-}
module Lib
( app
) where
import GHC.Generics
import Data.Monoid (mappend)
import Data.Text (Text)
import Control.Exception (finally)
import Control.Monad (forM_, forever)
import Control.Concurrent (MVar, newMVar, modifyMVar_, modifyMVar, readMV... | ludvigsen/drawable-backend | src/Lib.hs | bsd-3-clause | 4,762 | 10 | 26 | 1,295 | 1,596 | 812 | 784 | 114 | 3 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE StandaloneDeriving #-}
module Calculator.... | jonathanknowles/haskell-calculator | source/library/Calculator/Types.hs | bsd-3-clause | 4,765 | 7 | 12 | 1,771 | 2,014 | 971 | 1,043 | -1 | -1 |
{-# OPTIONS_GHC -Wall #-}
module System.Console.ShSh.Builtins.Util ( orDash,
readFileOrStdin,
readFileOrStdinWithFilename,
readFilesOrStdin,
readFil... | shicks/shsh | System/Console/ShSh/Builtins/Util.hs | bsd-3-clause | 1,686 | 0 | 11 | 563 | 408 | 220 | 188 | 32 | 3 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances, OverlappingInstances, TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances, FlexibleContexts #-}
{-# LANGUAGE PatternGuards, RecordWildCards, NamedFieldPuns #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{... | pepeiborra/narradar | src/Narradar/Types/Problem.hs | bsd-3-clause | 14,725 | 93 | 23 | 4,362 | 5,233 | 2,749 | 2,484 | 274 | 3 |
import qualified Data.Map as M
import qualified Data.List as L
digit2Word :: M.Map Char String
digit2Word = M.fromList [('1', "one"), ('2' ,"two"), ('3', "three"),
('4', "four"), ('5', "five"), ('6', "six"),
('7', "seven"), ('8', "eight"), ('9', "nine")]
getVal :: May... | m00nlight/99-problems | haskell/p-95.hs | bsd-3-clause | 587 | 1 | 11 | 150 | 250 | 137 | 113 | 16 | 1 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/Map/Strict.hs" #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
... | phischu/fragnix | benchmarks/containers/Data.Map.Strict.hs | bsd-3-clause | 44,357 | 0 | 23 | 11,607 | 8,387 | 4,538 | 3,849 | 451 | 10 |
main = putStr "Hello, world!\n"
| irori/hs2lazy | examples/hello.hs | bsd-3-clause | 32 | 0 | 5 | 5 | 9 | 4 | 5 | 1 | 1 |
module BPython.PyType where
data PythonType = PyInt | PyFloat | PyString | PyBool | PyVoid | PyFun [PythonType] PythonType |
PyAny | PyAnyOf [PythonType] | PyAnyFunction | PyList PythonType | PyVar String |
PyForAll String PythonType | PyForAnyOf String [PythonType] PythonType | PyRange
instance Eq PythonT... | feelout/mscthesiscode | BPython/PyType.hs | bsd-3-clause | 1,277 | 4 | 10 | 282 | 537 | 273 | 264 | 33 | 1 |
module Data.TestCase1TcLiteral where
import Language.Haskell.Exts
import BuiltIn.BuiltInTypes
import Tc.Class
import qualified Utils.Env as Env
import Utils.Id
-- test1
a = TyVar (Ident "$0")
test1 = (Char 'c', ([], tChar))
test2 = (String "", ([], tString))
test3 = (Int 0, ([numconstr a], a))
test4 = (Frac 0.6, ... | rodrigogribeiro/mptc | test/Data/TestCase1TcLiteral.hs | bsd-3-clause | 343 | 0 | 8 | 57 | 146 | 87 | 59 | 11 | 1 |
{-- snippet all --}
import Data.Char(toUpper)
main = interact (map toUpper . (++) "Your data, in uppercase, is:\n\n")
{-- /snippet all --}
| binesiyu/ifl | examples/ch07/toupper-lazy5.hs | mit | 141 | 0 | 8 | 24 | 36 | 20 | 16 | 2 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE... | yesodweb/persistent | persistent-redis/tests/basic-test.hs | mit | 1,838 | 0 | 13 | 527 | 442 | 228 | 214 | 45 | 2 |
{- |
Module : Camfort.Specification.Stencils.Annotation
Description : Annotation with stencil information.
Copyright : (c) 2017, Dominic Orchard, Andrew Rice, Mistral Contrastin, Matthew Danish
License : Apache-2.0
Maintainer : [email protected]
Stability : experimental
Defines the 'StencilAnn... | dorchard/camfort | src/Camfort/Specification/Stencils/Annotation.hs | apache-2.0 | 4,460 | 0 | 15 | 880 | 954 | 529 | 425 | 80 | 2 |
<?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="hr-HR">
<title>Export Report | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapr... | veggiespam/zap-extensions | addOns/exportreport/src/main/javahelp/org/zaproxy/zap/extension/exportreport/resources/help_hr_HR/helpset_hr_HR.hs | apache-2.0 | 975 | 80 | 66 | 160 | 415 | 210 | 205 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Benchmarks.Concat (benchmark) where
import Control.Monad.Trans.Writer
import Criterion (Benchmark, bgroup, bench, whnf)
import Data.Text as T
benchmark :: IO Benchmark
benchmark = return $ bgroup "Concat"
[ bench "append" $ whnf (append4 "Text 1" "Text 2" "Text 3") "Text 4... | text-utf8/text | benchmarks/haskell/Benchmarks/Concat.hs | bsd-2-clause | 797 | 0 | 11 | 158 | 273 | 149 | 124 | 17 | 1 |
-- |
-- Module : Codec.Binary.Uu
-- Copyright : (c) 2007 Magnus Therning
-- License : BSD3
--
-- Uuencoding is notoriously badly specified. This implementation is
-- compatible with the GNU Sharutils
-- (<http://www.gnu.org/software/sharutils/>).
--
-- Further documentation and information can be found at
-- <htt... | magthe/dataenc | src/Codec/Binary/Uu.hs | bsd-3-clause | 4,763 | 0 | 17 | 1,621 | 1,492 | 826 | 666 | 94 | 7 |
{-# OPTIONS -XOverloadedStrings #-}
module QueuePurgeSpec (main, spec) where
import Test.Hspec
import Network.AMQP
import Data.ByteString.Lazy.Char8 as BL hiding (putStrLn)
import Control.Concurrent (threadDelay)
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "purgeQueue" $ do
contex... | bitemyapp/amqp | test/QueuePurgeSpec.hs | bsd-3-clause | 1,950 | 0 | 21 | 856 | 433 | 225 | 208 | 38 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeApplications #-}
module Main where
import qualified ... | k0001/haskell-money | safe-money-xmlbf/test/Main.hs | bsd-3-clause | 9,669 | 0 | 16 | 1,776 | 3,003 | 1,592 | 1,411 | 187 | 1 |
-- | Rewrite ensures variable with return expression.
module Ivory.Compile.C.Prop where
import qualified Ivory.Language.Syntax as I
--------------------------------------------------------------------------------
-- | Replace ensures variable with the return expression.
ensTrans :: I.Expr -> I.Expr -> I.Expr
ensTra... | GaloisInc/ivory | ivory-backend-c/src/Ivory/Compile/C/Prop.hs | bsd-3-clause | 992 | 0 | 12 | 266 | 309 | 157 | 152 | 17 | 13 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANG... | AndreasPK/stack | src/Stack/Types/StackT.hs | bsd-3-clause | 12,362 | 0 | 24 | 3,959 | 2,860 | 1,463 | 1,397 | 267 | 7 |
{-
Copyright 2015 Google Inc. 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 applicable law or a... | xwysp/codeworld | codeworld-base/src/Control/Category.hs | apache-2.0 | 747 | 0 | 4 | 136 | 23 | 17 | 6 | 4 | 0 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE MultiParamTypeClasses, Rank2Types #-}
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Groups.Helpers
-- Copyright : Quentin Moser <[email protected]>
-- License : BSD-style (see LICEN... | markus1189/xmonad-contrib-710 | XMonad/Layout/Groups/Helpers.hs | bsd-3-clause | 8,099 | 0 | 16 | 2,342 | 1,297 | 709 | 588 | 105 | 2 |
-- standard modules we almost always want
module Util.Std(
module Control.Applicative,
module Control.Monad,
module Control.Monad.Identity,
module Data.Foldable,
module Data.List,
module Data.Maybe,
module Data.Monoid,
module Data.Traversable,
modu... | m-alvarez/jhc | src/Util/Std.hs | mit | 673 | 0 | 6 | 135 | 155 | 101 | 54 | 19 | 0 |
module A1 where
import Control.Parallel.Strategies
fib t n
| n <= 1 = 1
| otherwise = n1_2 + n2_2 + 1
where
n1 = fib 20 (n-1)
n2 = fib 20 (n-2)
(n1_2, n2_2)
=
runEval
(do n1_2 <- rpar_abs_1 n1
n2_2 <- rpar_abs_1 n2
... | RefactoringTools/HaRe | old/testing/introDeepSeq/A1_TokOut.hs | bsd-3-clause | 507 | 0 | 12 | 256 | 175 | 88 | 87 | 17 | 1 |
module A2 where
fib 1 = 1
fib n = n1 + n2 + 1
where
n1 = fib (n-1)
n2 = fib (n-2) | RefactoringTools/HaRe | old/testing/evalMonad/A2.hs | bsd-3-clause | 89 | 0 | 9 | 31 | 60 | 32 | 28 | 5 | 1 |
module FunIn3 where
--The application of a function is replaced by the right-hand side of the definition,
--with actual parameters replacing formals.
--In this example, unfold 'addthree'.
--This example aims to test the elimination of extra parentheses when unfolding
--a function defintion.
main :: Int -> Int
main =... | kmate/HaRe | old/testing/unfoldDef/FunIn3.hs | bsd-3-clause | 476 | 0 | 14 | 121 | 106 | 58 | 48 | 7 | 2 |
-- Dummy ParsecCombinator module
module ParsecChar where
import Parsec
type CharParser st a = GenParser Char st a
alphaNum :: CharParser st Char
alphaNum = undefined
char :: Char -> CharParser st Char
char = undefined
newline :: CharParser st Char
newline = undefined
| forste/haReFork | tools/base/tests/GhcLibraries/ParsecChar.hs | bsd-3-clause | 275 | 0 | 6 | 51 | 72 | 41 | 31 | 9 | 1 |
module HAD.Y2014.M04.D10.Exercise where
{- | onBothSide
Apply the same argument on both side of a binary numeric function.
The only interesting solution is point-free.
It IS the easiest exercise so far, with the shortest solution.
Examples:
prop> onBothSide (+) x = x + x
prop> onBothSide (*) x =... | 1HaskellADay/1HAD | exercises/HAD/Y2014/M04/D10/Exercise.hs | mit | 401 | 0 | 9 | 95 | 46 | 27 | 19 | 3 | 1 |
import Q (message)
main :: IO ()
main = putStrLn message
| themoritz/cabal | cabal-testsuite/PackageTests/Sandbox/Reinstall/p/Main.hs | bsd-3-clause | 58 | 0 | 6 | 12 | 27 | 14 | 13 | 3 | 1 |
{-# LANGUAGE TypeFamilies, GHCForeignImportPrim, MagicHash,
UnliftedFFITypes #-}
module Cc015 where
import Foreign
import Foreign.C.Types
import GHC.Prim
type family F a
type instance F Int = Int# -> Int#
foreign import prim "f" f :: F Int
| urbanslug/ghc | testsuite/tests/ffi/should_compile/cc016.hs | bsd-3-clause | 259 | 0 | 6 | 55 | 54 | 33 | 21 | -1 | -1 |
-- !!! Hiding an abstract (Prelude) type
module M where
import Prelude hiding ( Char )
import Data.Char hiding ( ord, Char )
import qualified Data.Char ( ord )
type Char = Int
ord :: Char -> Int
ord x = Data.Char.ord (chr x) + 1
| urbanslug/ghc | testsuite/tests/module/mod111.hs | bsd-3-clause | 235 | 0 | 8 | 52 | 78 | 47 | 31 | 7 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Data.Mole.Watcher
( attachFileWatcher
, detachFileWatcher
) where
import Control.Concurrent.STM
import Control.Concurrent
import Control.Monad
import qualified Data.Map as M
import qualified Data.Set as S
import Data.Mayb... | wereHamster/mole | src/Data/Mole/Watcher.hs | mit | 1,680 | 0 | 26 | 548 | 537 | 275 | 262 | 42 | 2 |
module GitHub ( Client
, newClient
, Request
, request
, httpRequest
, fetch
, fetchJSON
, fetchSingle
, fetchAll
, User(..)
, Repository(..)
, fetchRepos
... | jspahrsummers/ScrumBut | GitHub.hs | mit | 11,519 | 0 | 26 | 3,480 | 3,037 | 1,600 | 1,437 | -1 | -1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE... | tolysz/yesod | yesod-core/Yesod/Core/Handler.hs | mit | 52,926 | 0 | 21 | 12,831 | 10,173 | 5,458 | 4,715 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE CPP #-}
module Text.Namelist.Parser (namelist) where
import Text.Parsec hiding (letter)
import Data.Complex(Complex((:+)))
import Data.Char (toUpper, toLower, isDigit)
import Data.CaseInsensitive (CI, mk)
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative ((<$>), (... | philopon/namelist-hs | src/Text/Namelist/Parser.hs | mit | 5,464 | 0 | 15 | 1,401 | 2,300 | 1,157 | 1,143 | 124 | 5 |
#!/usr/bin/env runhaskell
import Data.List (intercalate)
import Text.Printf (printf)
type Interval = (Double, Double)
type Subdivisions = Double
type Function = Double -> Double
type Polynomial = Function
type Spline = [(Interval, Polynomial)]
delta = 0.1 :: Double
pairs :: [a] -> [(a,a)]
pairs xs = zip xs (drop 1 ... | ergenekonyigit/Numerical-Analysis-Examples | Haskell/SplineInterpolation.hs | mit | 3,027 | 0 | 24 | 1,396 | 1,319 | 703 | 616 | 69 | 2 |
module Text.Typeical.Writers.BNF (showBNF, showTerm, writeBNF, writeTerm, showSymbol) where
import Text.Typeical.Gramma
import Data.Bifunctor;
import Data.Maybe;
import Data.List;
import Data.List.Split hiding (oneOf);
import Control.Monad;
import qualified... | kalhauge/typeical | src/Text/Typeical/Writers/BNF.hs | mit | 1,528 | 0 | 10 | 481 | 469 | 247 | 222 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Network.ConcurrencySpec where
import Test.Hspec
import qualified Network.Freddy as Freddy
import qualified Network.Freddy.Request as R
import Control.Concurrent.Async (forConcurrently)
import System.Timeout (timeout)
import Data.Maybe (isJust)
import SpecHelper (
randomQueue... | salemove/freddy-hs | test/Network/ConcurrencySpec.hs | mit | 1,263 | 0 | 17 | 245 | 295 | 155 | 140 | 31 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ... | nshepperd/funn | Testing/opencl.hs | mit | 8,289 | 0 | 14 | 1,679 | 2,884 | 1,479 | 1,405 | 214 | 1 |
-- Character with longest repetition
-- https://www.codewars.com/kata/586d6cefbcc21eed7a001155
module Kata(longestRepetition) where
import Data.Ord (comparing)
import Control.Arrow ((&&&))
import Data.List (group, maximumBy)
longestRepetition :: String -> Maybe (Char, Int)
longestRepetition [] = Nothing
longestRepet... | gafiatulin/codewars | src/6 kyu/LongestRepetition.hs | mit | 399 | 0 | 11 | 51 | 117 | 66 | 51 | 7 | 1 |
--Project Euler Problem N
problem_N = sum[x | x <- [1..999], mod x 3 == 0 || mod x 5 == 0]
main :: IO()
main = do
y <- return (problem_N)
putStrLn("Answer to problem N = " ++ show(y))
| calewis/SmallProjectsAndDev | project_euler/haskell/template.hs | mit | 195 | 0 | 11 | 51 | 99 | 49 | 50 | 5 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.