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 RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Network.BitTorrent.Tracker.TestData
( TrackerEntry (..)
, isUdpTracker
, isHttpTracker
, trackers
, badTracker
) where
import Data.Maybe
import Data.String
import Network.URI
import Data.Torrent
d... | DavidAlphaFox/bittorrent | tests/Network/BitTorrent/Tracker/TestData.hs | bsd-3-clause | 2,679 | 0 | 10 | 550 | 517 | 290 | 227 | 57 | 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>DOM XSS Active Scan Rule | ZAP Extension</title>
<maps>
<homeID>top</homeID>... | 0xkasun/security-tools | src/org/zaproxy/zap/extension/domxss/resources/help_it_IT/helpset_it_IT.hs | apache-2.0 | 986 | 80 | 66 | 163 | 421 | 213 | 208 | -1 | -1 |
-------------------------------------------------------------------------------
-- |
-- Module : System.Hardware.Haskino.Test.ExprWord8
-- Copyright : (c) University of Kansas
-- License : BSD3
-- Stability : experimental
--
-- Quick Check tests for Expressions returning a Expr Word8
------------------... | ku-fpg/kansas-amber | tests/ExprTests/IfThenElseWord8.hs | bsd-3-clause | 1,353 | 0 | 17 | 239 | 342 | 190 | 152 | 28 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
module Database.Persist.Sql.Migration
( parseMigration
, parseMigration'
, printMigration
, showMigration
, getMigration
, runMigration
, runMigrationSilent
, runMigrationUnsafe
, migrate
) where
import Control.Monad.Trans.Control (MonadBaseCo... | mitchellwrosen/persistent | persistent/Database/Persist/Sql/Migration.hs | mit | 4,181 | 0 | 12 | 955 | 1,193 | 624 | 569 | 97 | 3 |
-- (c) The FFI task force, 2001
--
-- Provides fixed sized, unsigned integral types
module Word (
Word8, Word16, Word32, Word64
) where
-- Constraints applying to all of the following types:
--
-- * For any types, all arithmetic is performed modulo 2^n, where n is the
-- number of bit width of the type.
--
-- * T... | phischu/gtk2hs | tools/c2hs/doc/c2hs/lib/Word.hs | lgpl-3.0 | 1,583 | 17 | 9 | 369 | 310 | 188 | 122 | -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="da-DK">
<title>Getting started Guide</title>
<maps>
<homeID>top</homeID>
<mapref locati... | thc202/zap-extensions | addOns/gettingStarted/src/main/javahelp/org/zaproxy/zap/extension/gettingStarted/resources/help_da_DK/helpset_da_DK.hs | apache-2.0 | 964 | 77 | 66 | 157 | 412 | 208 | 204 | -1 | -1 |
module A2 where
import C2
import D2
sumSq xs
= ((sum (map (sq sq_f) xs)) + (sumSquares xs)) +
(sumSquares1 xs)
sq_f_2 = 2
main = sumSq [1 .. 4]
| kmate/HaRe | old/testing/addOneParameter/A2AST.hs | bsd-3-clause | 167 | 0 | 13 | 53 | 80 | 44 | 36 | 8 | 1 |
{-# LANGUAGE BangPatterns, CPP, ScopedTypeVariables #-}
-----------------------------------------------------------------------------
--
-- The register allocator
--
-- (c) The University of Glasgow 2004
--
-----------------------------------------------------------------------------
{-
The algorithm is roughly:
1... | ezyang/ghc | compiler/nativeGen/RegAlloc/Linear/Main.hs | bsd-3-clause | 37,857 | 0 | 25 | 13,401 | 5,786 | 2,957 | 2,829 | 467 | 13 |
module SafeLang14_A (IsoInt, h, showH, P, p, showP) where
newtype IsoInt = I Int
h :: IsoInt
h = I 2
showH :: String
showH = let I n = h
in show n
data P = P Int
p :: P
p = P 3
showP :: P -> String
showP (P n) = "Should be 3 := " ++ show n
| hferreiro/replay | testsuite/tests/safeHaskell/safeLanguage/SafeLang14_A.hs | bsd-3-clause | 255 | 0 | 9 | 78 | 125 | 68 | 57 | 12 | 1 |
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE UnboxedTuples #-}
{-# LANGUAGE Unsafe #-}
{-# OPTIONS_HADDOCK not-home #-}
-------------------------------------------------------------------------... | urbanslug/ghc | libraries/base/GHC/Natural.hs | bsd-3-clause | 21,893 | 0 | 13 | 5,371 | 4,695 | 2,371 | 2,324 | 165 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleInstances #-}
module TcCustomSolverSuper where
import GHC.TypeLits
import Data.Typeable
{-
When solving super-class instances, GHC solves the evidence without
using the solver (see `tcSuperClasses` in `TcInstDecls`).
However, some classes need to be excepted from this... | wxwxwwxxx/ghc | testsuite/tests/typecheck/should_compile/TcCustomSolverSuper.hs | bsd-3-clause | 528 | 0 | 6 | 91 | 75 | 40 | 35 | -1 | -1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE TypeFamilies #-}
-- | This module implements an optimization that tries to statically reuse
-- kernel-level allocations. The goal is to lower the static memory usage, which
-- might allow more programs to ru... | HIPERFIT/futhark | src/Futhark/Optimise/MemoryBlockMerging.hs | isc | 9,123 | 0 | 21 | 2,146 | 3,118 | 1,570 | 1,548 | 215 | 4 |
{-# LANGUAGE OverloadedStrings #-}
module IO where
import Prelude hiding (readFile, putStrLn)
import Control.Monad (mzero)
import Data
import Data.Map.Lazy hiding (foldl, map, maximum, member, size)
import Data.Text.Lazy hiding (empty, foldl, map, maximum)
import Data.Aeson
import Data.ByteString.Lazy hiding (empty, f... | marcellussiegburg/icfp-2015 | IO.hs | mit | 2,757 | 0 | 19 | 811 | 953 | 514 | 439 | 74 | 1 |
module RandomExample1 where
import System.Random
data Die = DieOne | DieTwo | DieThree | DieFour | DieFive | DieSix deriving (Eq, Show)
intToDie :: Int -> Die
intToDie n =
case n of
1 -> DieOne
2 -> DieTwo
3 -> DieThree
4 -> DieFour
5 -> DieFive
6 -> DieSix
x -> error $ "intTo... | JoshuaGross/haskell-learning-log | Code/Haskellbook/State/src/RandomExample1.hs | mit | 584 | 0 | 11 | 170 | 237 | 129 | 108 | 20 | 7 |
module Oden.Go.PrettySpec where
import Oden.Go.Identifier
import Oden.Go.AST
import Oden.Go.Type
import Oden.Go.Pretty ()
import Text.PrettyPrint.Leijen
import Test.Hspec
shouldPrintAs x s = displayS (renderPretty 0.4 100 (pretty x)) "" `shouldBe` s
ident... | AlbinTheander/oden | test/Oden/Go/PrettySpec.hs | mit | 6,869 | 0 | 25 | 2,282 | 1,631 | 806 | 825 | 199 | 1 |
module Main (main) where
import Network.Hstack
import Network.Hstack.Internal
import Control.Monad.Identity
import Control.Monad.State.Lazy
import qualified Data.ByteString as BS
import Data.Maybe
import Test.Framework.Providers.QuickCheck2
import Test.Framework (defaultMain)
test_1 = let
a :: OutcomeT Maybe Int
... | davidhinkes/hstack | tests/Test.hs | mit | 726 | 0 | 13 | 160 | 260 | 137 | 123 | 28 | 2 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ViewPatterns #-}
module Hanabi.Client
( startClient
) where
import Control.Concurrent.Async (async, cancel)
import Control.Concurrent.MVar
(MVar, newEmptyMVar, put... | TimoFreiberg/hanabi | src/Hanabi/Client.hs | mit | 4,025 | 0 | 24 | 892 | 1,239 | 628 | 611 | 111 | 5 |
-----------------------------------------------------------------------------
-- |
-- Module : Algebra.Graph.Test.Relation
-- Copyright : (c) Andrey Mokhov 2016-2022
-- License : MIT (see the file LICENSE)
-- Maintainer : andrey.mokhov@gmail.com
-- Stability : experimental
--
-- Testsuite for "Algebra.Graph.Re... | snowleopard/alga | test/Algebra/Graph/Test/Relation.hs | mit | 2,086 | 0 | 12 | 408 | 407 | 206 | 201 | -1 | -1 |
module Settings.Flavours.Quickest (quickestFlavour) where
import Flavour
import Expression
import {-# SOURCE #-} Settings.Default
quickestFlavour :: Flavour
quickestFlavour = defaultFlavour
{ name = "quickest"
, args = defaultBuilderArgs <> quickestArgs <> defaultPackageArgs
, libraryWays = ... | izgzhen/hadrian | src/Settings/Flavours/Quickest.hs | mit | 681 | 0 | 9 | 153 | 161 | 96 | 65 | 20 | 1 |
module Main where
import Server
main :: IO ()
main = startServer
| evansb/sacred | sacred/Main.hs | mit | 68 | 0 | 6 | 15 | 22 | 13 | 9 | 4 | 1 |
-- |
-- Module: AI.Fann.Types
-- Copyright: (C) 2016 Patrik Sandahl
-- Licence: MIT
-- Maintainer: Patrik Sandahl <patrik.sandahl@gmail.com>
-- Stability: experimental
-- Portability: Linux
module AI.Fann.Types
( ActivationFunction (..)
, InputData
, OutputData
, activationToInt
) whe... | kosmoskatten/hfann | src/AI/Fann/Types.hs | mit | 1,812 | 0 | 6 | 519 | 287 | 166 | 121 | 47 | 1 |
----------
-- Functor
----------
class Functor f where
fmap :: (a -> b) -> f a -> f b
instance Functor ((->) r) where
fmap = (.)
--lifting a function
----------------------
-- Applicative Functor
----------------------
class (Functor f) => Applicative f where
pure :: a -> f a
(<*>) :: f (a -> b) ->... | zxl20zxl/learnyouahaskell | Typeclasses.hs | mit | 924 | 0 | 10 | 293 | 397 | 210 | 187 | 21 | 1 |
module Print3 where
myGreeting :: String
myGreeting = "hello" ++ "world!"
hello :: String
hello = "hello"
world :: String
world = "world!"
main :: IO ()
main = do
putStrLn myGreeting
putStrLn secondGreeting
where secondGreeting = concat [hello, " ", world]
| raventid/coursera_learning | haskell/print3.hs | mit | 267 | 0 | 8 | 52 | 84 | 46 | 38 | 12 | 1 |
module Hpcb.Data.KicadPCB (
kicadPCB
) where
import Hpcb.SExpr
import Hpcb.Data.Circuit
import Hpcb.Data.NetNumbering
import Hpcb.Data.Net
-- | Generates the general section from a given circuit.
general :: Circuit -> Item
general c@(Circuit f g s) = Item "general" [
Item "links" [PInt 0],
Item "no_connects" [P... | iemxblog/hpcb | src/Hpcb/Data/KicadPCB.hs | mit | 4,773 | 0 | 15 | 924 | 1,757 | 889 | 868 | 124 | 1 |
module ACME.Yes.PreCure5.GoGo
( module ACME.Yes.PreCure5.GoGo.Profiles
, isPreCure5GoGo
) where
import ACME.Yes.PreCure5.GoGo.Profiles
import ACME.Yes.PreCure5.GoGo.Parser
| igrep/yes-precure5-command | ACME/Yes/PreCure5/GoGo.hs | mit | 179 | 0 | 5 | 20 | 38 | 28 | 10 | 5 | 0 |
{-# LANGUAGE NoMonomorphismRestriction, FlexibleInstances #-}
module Graph.Op
( module Expression.Op
, eval, eval0, Graph
, example
)
where
import Expression.Op
import qualified Autolib.TES.Binu as U
import Autolib.Graph.Graph ( Graph )
import qualified Autolib.Graph.Basic as B
import qualified Autolib.Graph.Ops... | Erdwolf/autotool-bonn | src/Graph/Op.hs | gpl-2.0 | 2,175 | 14 | 14 | 670 | 817 | 476 | 341 | 58 | 2 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable, UndecidableInstances, FlexibleContexts #-}
module Convert.Input where
import Autolib.Reader
import Autolib.ToDoc
import Autolib.Reporter
import Autolib.Set
import Data.Typeable
import Autolib.NFA ( NFAC )
import qualified Autolib.NFA
import qualified Autolib.Exp
imp... | Erdwolf/autotool-bonn | src/Convert/Input.hs | gpl-2.0 | 2,230 | 37 | 9 | 479 | 645 | 360 | 285 | 57 | 1 |
{-# LANGUAGE ViewPatterns #-}
module Language.Rust.Idiomatic (
itemIdioms
) where
import qualified Language.Rust.AST as Rust
unsnoc :: [a] -> Maybe ([a], a)
unsnoc [] = Nothing
unsnoc (x:xs) = case unsnoc xs of
Just (a, b) -> Just (x:a, b)
Nothing -> Just ([], x)
tailExpr :: Rust.Expr -> Maybe (Maybe Ru... | jameysharp/corrode | src/Language/Rust/Idiomatic.hs | gpl-2.0 | 1,755 | 0 | 15 | 298 | 484 | 256 | 228 | 21 | 2 |
xs = [ 8,2,22,97,38,15,0,40,0,75,4,5,7,78,52,12,50,77,91,8,
49,49,99,40,17,81,18,57,60,87,17,40,98,43,69,48,4,56,62,0,
81,49,31,73,55,79,14,29,93,71,40,67,53,88,30,3,49,13,36,65,
52,70,95,23,4,60,11,42,69,24,68,56,1,32,56,71,37,2,36,91,
22,31,16,71,51,67,63,89,41,92,36,54,22,40,40,28,66,33,1... | ciderpunx/project_euler_in_haskell | euler011.hs | gpl-2.0 | 1,817 | 0 | 12 | 295 | 1,523 | 971 | 552 | 30 | 1 |
module Heqet.Dynamics where
import Heqet.Types
ppp = 0.05 :: Dynamic
pp = 0.1 :: Dynamic
p = 0.25 :: Dynamic
mp = 0.4 :: Dynamic
mf = 0.6 :: Dynamic
f = 0.77 :: Dynamic
ff = 0.9 :: Dynamic
fff = 1 :: Dynamic | Super-Fluid/heqet | Heqet/Dynamics.hs | gpl-3.0 | 209 | 0 | 4 | 46 | 75 | 47 | 28 | 10 | 1 |
module PropT19 where
import Prelude(Bool(..))
import Zeno
-- Definitions
True && x = x
_ && _ = False
False || x = x
_ || _ = True
not True = False
not False = True
-- Nats
data Nat = S Nat | Z
(+) :: Nat -> Nat -> Nat
Z + y = y
(S x) + y = S (x + y)
(*) :: Nat -> Nat -> Nat
Z * _ = Z
(S x) * y = y + (x... | danr/hipspec | testsuite/prod/zeno_version/PropT19.hs | gpl-3.0 | 2,988 | 0 | 12 | 922 | 2,018 | 1,050 | 968 | 114 | 2 |
module MimeTypes (MimeType(..), initMimeTypes, mimeTypeOf) where
{ import qualified Data.Map as Map;
import IO;
import System.IO.Unsafe;
import Data.IORef;
import Text.Regex;
import Monad;
data MimeType = MimeType String String;
instance Show MimeType where
{ showsPrec _ (MimeType part1 ... | ckaestne/CIDE | CIDE_Language_Haskell/test/WSP/Webserver/MimeTypes.hs | gpl-3.0 | 1,748 | 0 | 15 | 538 | 603 | 332 | 271 | 43 | 3 |
-- file ch03/BadPattern.hs
{- An example of what happens when you omit the check for the [] constructor
when writing a series of patterns -}
badExample (x:xs) = x + badExample xs
{- Using a wild card to provide default behaviour for contructors we do not
care about -}
goodExample (x:xs) = x + goodExample xs
goodExamp... | craigem/RealWorldHaskell | ch03/BadPattern.hs | gpl-3.0 | 334 | 0 | 7 | 67 | 56 | 29 | 27 | 3 | 1 |
module Peer.Handshake.Parse where
import Peer.Handshake.Protocol
import HTorrentPrelude
import Data.Attoparsec as A
parseHandshake :: Parser (ByteString, ByteString)
parseHandshake = do
word8 (fromIntegral protocolLength) >> string protocol <?> "Protocol"
A.take 8 <?> "Reserved Bytes"
(,) <$> (A.take 20 ... | ian-mi/hTorrent | Peer/Handshake/Parse.hs | gpl-3.0 | 362 | 0 | 12 | 59 | 115 | 61 | 54 | 9 | 1 |
module Parsing where
import Text.Trifecta
import Control.Applicative
data NumberOrString =
NOSS String
| NOSI Integer
deriving (Show)
type Major = Integer
type Minor = Integer
type Patch = Integer
type Release = [NumberOrString]
type Metadata = [NumberOrString]
data SemVer =
SemVer Major Min... | thewoolleyman/haskellbook | 24/02/haskell-club/Parsing.hs | unlicense | 862 | 0 | 13 | 189 | 267 | 138 | 129 | 31 | 1 |
module Polynomial.A330542Spec (main, spec) where
import Test.Hspec
import Polynomial.A330542 (a330542)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A330542" $
it "correctly computes the first 20 elements" $
map a330542 [2..21] `shouldBe` expectedValue where
expectedValue = [2,6,12,30,60,1... | peterokagey/haskellOEIS | test/Polynomial/A330542Spec.hs | apache-2.0 | 397 | 0 | 8 | 57 | 154 | 92 | 62 | 10 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Openshift.V1.NamedTagEventList where
import GHC.Generics
import Data.Text
import Openshift.V1.TagEvent
import Openshift.V1.TagEventCondition
im... | minhdoboi/deprecated-openshift-haskell-api | openshift/lib/Openshift/V1/NamedTagEventList.hs | apache-2.0 | 723 | 0 | 10 | 113 | 115 | 72 | 43 | 18 | 0 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QGraphicsScene.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:34
Warning : this file is machine generated - d... | keera-studios/hsQt | Qtc/Enums/Gui/QGraphicsScene.hs | bsd-2-clause | 6,183 | 0 | 18 | 1,403 | 1,703 | 846 | 857 | 151 | 1 |
-- http://www.codewars.com/kata/545f05676b42a0a195000d95
module RankVector where
import Data.List
import Data.Maybe
ranks :: Ord a => [a] -> [Int]
ranks xs = map (succ . fromJust . flip elemIndex ys) xs where
ys = sortBy (flip compare) xs | Bodigrim/katas | src/haskell/6-Rank-Vector.hs | bsd-2-clause | 242 | 0 | 9 | 39 | 84 | 45 | 39 | 6 | 1 |
{-|
Module : Grammar.MC
Description : Definition of the MC monad.
Copyright : (c) Davide Mancusi, 2017
License : BSD3
Maintainer : arekfu@gmail.com
Stability : experimental
Portability : POSIX
This module exports the 'MC' (Monte Carlo) monad, which can be used to stream
the pseudo-random number generator... | arekfu/grammar-haskell | src/Grammar/MC.hs | bsd-3-clause | 4,936 | 0 | 12 | 1,237 | 999 | 535 | 464 | -1 | -1 |
module Misc where
import Control.Applicative
import System.Directory
import System.FilePath
import Data.List
feither :: Either a b -> (a -> c) -> (b -> c) -> c
feither e f g = either f g e
fmaybe :: Maybe a -> b -> (a -> b) -> b
fmaybe m f g = maybe f g m
dotMo :: String -> ... | bergmark/mmdoc | src/Misc.hs | bsd-3-clause | 559 | 0 | 9 | 137 | 197 | 104 | 93 | 15 | 1 |
module Main where
import HW3Test (hw3Tests)
import HW4Test (hw4Tests)
import HW5Test (hw5Tests)
import HW6Test (hw6Tests)
import HW7Test (hw7Tests)
import HW8Test (hw8Tests)
import HW10Test (hw10Tests)
import HW11Test ... | cgag/cis-194-solutions | test/Main.hs | bsd-3-clause | 880 | 0 | 9 | 423 | 148 | 88 | 60 | 23 | 1 |
{-# LANGUAGE ForeignFunctionInterface #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
-- Haskell implementation of H2O's priority queue.
-- https://github.com/h2o/h2o/blob/master/lib/http2/scheduler.c
module RingOfQueues (
Entry
, newEntry
, renewEntry
, ... | kazu-yamamoto/http2 | bench-priority/RingOfQueues.hs | bsd-3-clause | 4,292 | 0 | 13 | 914 | 1,105 | 588 | 517 | 94 | 3 |
{-# LANGUAGE PackageImports #-}
module Text.ParserCombinators.ReadP (module M) where
import "base" Text.ParserCombinators.ReadP as M
| silkapp/base-noprelude | src/Text/ParserCombinators/ReadP.hs | bsd-3-clause | 138 | 0 | 4 | 18 | 23 | 17 | 6 | 3 | 0 |
module VisualizationData.Queue.Bankers where
import VisualizationData.Queue.Interface
import qualified Data.List as L
import qualified VisualizationData.LenList as LL
data BQueue a
= BQueue
{ heads :: LL.LenList a
, tails :: LL.LenList a
}
instance Show a => Show (BQueue a) where
show q =
"fromList " +... | timjb/pfds-visualizations | src/VisualizationData/Queue/Bankers.hs | bsd-3-clause | 1,779 | 0 | 12 | 427 | 823 | 426 | 397 | 57 | 3 |
{-# LANGUAGE QuasiQuotes #-}
module Main where
import Test.Framework
import Test.Framework.Providers.HUnit
import Test.HUnit (Assertion, (@?=))
import qualified Data.ByteString.Char8 as B
import Data.Loc (SrcLoc, noLoc, startPos)
import Control.Exception (SomeException)
import Language.C.Quote.C
import qualified Lan... | flowbox-public/language-c-quote | tests/unit/Main.hs | bsd-3-clause | 15,024 | 0 | 21 | 5,117 | 3,151 | 1,900 | 1,251 | 346 | 2 |
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
module Data.Logic.Atomic.Class where
import Data.Functor.Identity
import Data.Functor.Compose
class Atomic a r | r -> a where
atom :: a -> r
data AnyAtomic a = AnyAtomic
... | kylcarte/finally-logical | src/Data/Logic/Atomic/Class.hs | bsd-3-clause | 1,629 | 0 | 11 | 432 | 719 | 380 | 339 | -1 | -1 |
{-# Language StandaloneDeriving, PatternGuards, CPP, OverloadedStrings #-}
module CabalBounds.Main
( cabalBounds
) where
import Distribution.PackageDescription (GenericPackageDescription)
import Distribution.PackageDescription.Parsec (parseGenericPackageDescription, runParseResult)
import Distribution.Parsec.Co... | dan-t/cabal-bounds | lib/CabalBounds/Main.hs | bsd-3-clause | 11,070 | 1 | 20 | 2,430 | 2,929 | 1,510 | 1,419 | -1 | -1 |
-- Copyright (c) 2016-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
module Duckling.Ordinal.KM.Tests
( tests ) where
import Prelude
import Data.String
import Test.Tasty
import D... | facebookincubator/duckling | tests/Duckling/Ordinal/KM/Tests.hs | bsd-3-clause | 504 | 0 | 9 | 78 | 79 | 50 | 29 | 11 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
module FPNLA.Operations.BLAS.Strategies.SYRK.Strategies.DefPar () where
import Control.DeepSeq (NFData)
import Con... | mauroblanco/fpnla-examples | src/FPNLA/Operations/BLAS/Strategies/SYRK/Strategies/DefPar.hs | bsd-3-clause | 2,176 | 0 | 15 | 1,082 | 510 | 280 | 230 | 32 | 0 |
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module TcErrors(
reportUnsolved, reportAllUnsolved, warnAllUnsolved,
warnDefaulting,
solverDepthErrorTcS
) where
#include "HsVersions.h"
import TcRnTypes
import TcRnMonad
import TcMType
import TcType
import RnEnv( unknownNameSuggestions )
import Type
... | oldmanmike/ghc | compiler/typecheck/TcErrors.hs | bsd-3-clause | 101,589 | 1 | 25 | 31,927 | 19,338 | 9,863 | 9,475 | -1 | -1 |
{-# LANGUAGE PackageImports #-}
import "hs-yesod-proto-nucleus" Application (develMain)
import Prelude (IO)
main :: IO ()
main = develMain
| Greif-IT/hs-yesod-proto | hs-yesod-proto-nucleus/app/devel.hs | bsd-3-clause | 140 | 0 | 6 | 19 | 34 | 20 | 14 | 5 | 1 |
module Cipher where
import Data.Char
-- Loops Int values through a specified range
modRange :: Int -> Int -> Int -> Int
modRange min max val = mod (val - min) (max - min + 1) + min
-- 'modRange' for lowercase alphabetic characters
alphaLower :: Int -> Int
alphaLower = modRange 97 122
-- caesar cipher for single Cha... | pdmurray/haskell-book-ex | src/ch9/Cipher.hs | bsd-3-clause | 608 | 0 | 9 | 135 | 209 | 112 | 97 | 14 | 1 |
{-# LANGUAGE NoMonomorphismRestriction #-}
module Backend.InductiveGraph.Proto1 where
import Backend.InductiveGraph.Draw
import Backend.InductiveGraph.DrawTIKZ
import Backend.InductiveGraph.InductiveGraph
import Backend.InductiveGraph.PrintLatex
import Backend.InductiveGraph.Probability
import Data.Graph.Inductive.Gr... | vzaccaria/bddtool | src/Backend/InductiveGraph/Proto1.hs | bsd-3-clause | 1,685 | 0 | 10 | 304 | 660 | 350 | 310 | 48 | 1 |
module Insomnia.Main.Command where
import System.Environment (getArgs)
data Command =
Typecheck !FilePath
| Gamble !FilePath
| HelpUsage
processArguments :: IO Command
processArguments = do
args <- getArgs
case args of
[arg] | arg == "--help" -> return HelpUsage
| otherwise -> return $ Typech... | lambdageek/insomnia | src/Insomnia/Main/Command.hs | bsd-3-clause | 476 | 0 | 13 | 105 | 147 | 74 | 73 | 20 | 3 |
{-# LANGUAGE OverloadedStrings #-}
module Bead.View.Content.EvaluationTable.Page (
evaluationTable
) where
import Control.Monad
import Data.Function (on)
import Data.List (sortBy)
import Data.Maybe (fromMaybe)
import Data.Map (Map)
import qualified Data.Map as Ma... | andorp/bead | src/Bead/View/Content/EvaluationTable/Page.hs | bsd-3-clause | 6,839 | 0 | 20 | 1,460 | 1,710 | 874 | 836 | 111 | 2 |
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.Template
main :: IO ()
main = do
t <- T.readFile "samples/sample1.tp"
mr <- template convert get t
maybe (return ()) T.putStr mr
convert :: T.Text -> [T.Text]
convert "name" = ["Yoshikuni", "Kazuhiro... | YoshikuniJujo/template | tests/test2t.hs | bsd-3-clause | 496 | 0 | 10 | 93 | 219 | 121 | 98 | 16 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Find (runFind, FindOpt(..)) where
import RarecoalLib.Utils (GeneralOptions(..), HistogramOptions(..), setNrProcessors)
import RarecoalLib.Core (ModelSpec(..), ModelEvent(..), EventType(..))
import SequenceFormats.RareAlleleHistogram (RareAlleleHistogram(..))
import RarecoalLib... | stschiff/rarecoal | src-rarecoal/Find.hs | gpl-3.0 | 4,856 | 0 | 19 | 1,142 | 1,534 | 798 | 736 | 89 | 2 |
{-# LANGUAGE TemplateHaskell #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-| Unittests for ganeti-htools.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following condit... | mbakke/ganeti | test/hs/Test/Ganeti/HTools/Backend/Text.hs | bsd-2-clause | 13,376 | 0 | 31 | 4,319 | 2,974 | 1,572 | 1,402 | 241 | 4 |
{-# OPTIONS_HADDOCK prune #-}
-- |
-- This package is deprecated, use Doctest`s cabal integration instead.
--
-- See: <https://github.com/sol/doctest-haskell#cabal-integration>
module Test.Framework.Providers.DocTest (docTest) where
import qualified Test.DocTest as DocTest
import Test.Framework
import Test.Framework.P... | sakari/test-framework-doctest | src/Test/Framework/Providers/DocTest.hs | bsd-3-clause | 1,350 | 0 | 11 | 197 | 317 | 170 | 147 | 23 | 1 |
{-|
Provides functions to establish connections, both passively and actively, with Openflow switches.
-}
module Network.Data.OF13.Server
( Switch(..)
, Factory
, runServer
, runServerOne
, sendMessage
, talk
, talk2
, connectToSwitch
) where
import Control... | AndreasVoellmy/openflow | src/Network/Data/OF13/Server.hs | bsd-3-clause | 3,323 | 0 | 15 | 797 | 1,040 | 524 | 516 | 78 | 4 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[PrelNames]{Definitions of prelude modules and names}
Nota Bene: all Names defined in here should come from the base package
- ModuleNames for prelude modules,
e.g. pREL_BASE_Name :: ModuleName
- Modules for prelude modules
e... | oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | 100,843 | 0 | 10 | 22,736 | 15,438 | 8,804 | 6,634 | 1,542 | 2 |
module Bead.View.Fay.Hooks where
import Prelude
import Bead.View.Fay.HookIds
data EvaluationHook = EvaluationHook {
evFormId :: String
, evSelectionId :: String
, evHiddenValueId :: String
, evSelectionDivId :: String
, evHelpMessageId :: String
}
{-
createCourseHook = EvaluationHook {
e... | pgj/bead | snaplets/fay/src/Bead/View/Fay/Hooks.hs | bsd-3-clause | 2,541 | 0 | 8 | 474 | 371 | 220 | 151 | 48 | 1 |
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
module Clang.Type
( isSameType
, getTypeSpelling
, getKind
, getCanonicalType
, getPointeeType
, getResultType
, getNumArgTypes
, getArgType
, isFunctionTypeVariadic
, getTypedefDeclUnderlyingType
, getEnumDeclIntegerType
, getEnumConstantDeclValue
, ... | deech/LibClang | src/Clang/Type.hs | bsd-3-clause | 5,032 | 0 | 11 | 786 | 1,666 | 818 | 848 | 103 | 2 |
{-# LANGUAGE ExistentialQuantification #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Simple.Command
-- Copyright : Duncan Coutts 2007
-- License : BSD3
--
-- Maintainer : cabal-devel@haskell.org
-- Portability : non-portable (Existential... | trskop/cabal | Cabal/Distribution/Simple/Command.hs | bsd-3-clause | 25,266 | 0 | 17 | 7,220 | 6,993 | 3,709 | 3,284 | 422 | 20 |
module DeepSeq2 where
import qualified Control.Parallel.Strategies as CP
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)
= CP.runEval
(do n1_2 <- (rpar_abs_1 `CP.dot` CP.rdeepseq) n1
... | RefactoringTools/HaRe | old/testing/introThreshold/DeepSeq2_TokOut.hs | bsd-3-clause | 555 | 0 | 15 | 247 | 204 | 106 | 98 | 16 | 1 |
module DoExp2 where
f x = g undefined
g x = do
x <- getLine
putStrLn x
| kmate/HaRe | old/testing/foldDef/DoExpr2_TokOut.hs | bsd-3-clause | 96 | 0 | 7 | 42 | 36 | 17 | 19 | 5 | 1 |
import Distribution.Simple
main = defaultMainWithHooks simpleUserHooks
| nilcons/PrefetchFS | Setup.hs | gpl-3.0 | 71 | 0 | 5 | 6 | 14 | 7 | 7 | 2 | 1 |
module T9441b where
f1 :: Integer -> Integer
f1 n
| n <= 1 = 1
| otherwise = go n 1
where
go 0 r = r
go m r = go (m - 1) (r * m)
f2 :: Integer -> Integer
f2 n = go n 1
where
go 0 s = s
go p s = go (p - 1) (s * p)
| sdiehl/ghc | testsuite/tests/simplCore/should_compile/T9441b.hs | bsd-3-clause | 243 | 0 | 9 | 97 | 149 | 75 | 74 | 11 | 2 |
{-# LANGUAGE BangPatterns #-}
module Main where
import qualified Data.ByteString as S
import Data.IORef
import Control.Monad
makeBs :: Int -> S.ByteString
makeBs n = S.replicate n (fromIntegral n)
doStuff :: IORef [S.ByteString] -> Int -> IO ()
doStuff ref n = do
let !bs = makeBs n
modifyIORef ref (bs:)
{-# ... | ezyang/ghc | testsuite/tests/perf/should_run/T7257.hs | bsd-3-clause | 691 | 0 | 16 | 175 | 311 | 153 | 158 | -1 | -1 |
module T5514 where
class Foo a where
foo :: a -> a
instance (Foo a, Foo b) => Foo (a, b) where
foo = foo' ()
-- foo' :: () -> b -> b
foo' es = const id (unitId es)
unitId :: () -> ()
unitId = id
| forked-upstream-packages-for-ghcjs/ghc | testsuite/tests/typecheck/should_compile/T5514.hs | bsd-3-clause | 201 | 0 | 7 | 55 | 99 | 53 | 46 | 8 | 1 |
module Main where
import Data.Conduit ((=$), ($$))
import Control.Monad (guard, void)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader.Class (asks)
import Data.Conduit.Find
import qualified Data.Conduit.List as DCL
import Data.List (isSuffix... | jwiegley/find-conduit | test/find-hs.hs | mit | 1,922 | 0 | 19 | 705 | 448 | 242 | 206 | 44 | 5 |
{-# LANGUAGE DeriveAnyClass, DeriveGeneric, FlexibleContexts,
MultiParamTypeClasses #-}
{- |
Module : System.JBI.Commands.Common
Description : How to handle build tools
Copyright : (c) Ivan Lazar Miljenovic
License : MIT
Maintainer : Ivan.Miljenovic@gmail.com
-}
module Syste... | ivan-m/jbi | lib/System/JBI/Commands/BuildTool.hs | mit | 7,701 | 0 | 13 | 1,783 | 1,608 | 864 | 744 | 117 | 3 |
module GHCJS.DOM.SVGFEColorMatrixElement (
) where
| manyoo/ghcjs-dom | ghcjs-dom-webkit/src/GHCJS/DOM/SVGFEColorMatrixElement.hs | mit | 53 | 0 | 3 | 7 | 10 | 7 | 3 | 1 | 0 |
{-# LANGUAGE DisambiguateRecordFields #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE BangPatterns #-}
module Turtle (turtleDraw, turtleSimlate, Turtle(..), Command(..)) where
import Control.Arrow
import GHC.Float (double2Float)
import Graphics.Gloss
window :: String -> Display
window s = InWindow s (500,500) (30,30... | lesguillemets/lsyst.hs | src/Turtle.hs | mit | 2,531 | 0 | 17 | 689 | 1,013 | 560 | 453 | -1 | -1 |
{-# LANGUAGE
TypeFamilies
#-}
{-|
Module : Text.ByoParser.Result
Description : Class of parsing results and drivers
Copyright : (c) 2016 Nicolas Godbout
License : MIT
Maintainer : nicolas.godbout@gmail.com
Stability : unstable
-}
module Text.ByoParser.Result (
-- * P... | DrNico/byoparser | Text/ByoParser/Result.hs | mit | 2,818 | 0 | 17 | 772 | 593 | 319 | 274 | 44 | 2 |
module Lambency.GameSession (
TimeStep, GameSession,
physicsDeltaTime, physicsDeltaUTC, mkGameSession
) where
--------------------------------------------------------------------------------
import qualified Control.Wire as W
import GHC.Float
import Data.Time
import Lambency.Types
------------------------------... | Mokosha/Lambency | lib/Lambency/GameSession.hs | mit | 683 | 0 | 8 | 71 | 115 | 68 | 47 | 13 | 1 |
module System.Himpy.Recipes.WinServices where
import System.Himpy.Recipes.Utils
import System.Himpy.Mib
import System.Himpy.Types
import System.Himpy.Logger
import System.Himpy.Output.Riemann
import Control.Concurrent.STM.TChan (TChan)
import qualified Data.Map as M
srv_rcp :: [String] -> TChan ([Metric]) -> TChan (St... | pyr/himpy | System/Himpy/Recipes/WinServices.hs | mit | 711 | 0 | 12 | 106 | 240 | 126 | 114 | 16 | 1 |
module PWM where
import Data.List
import Data.List.Split
import Numeric.Container
import System.Random
import Util
-- | Data type for nucleotide and nucleotide sequences.
data Nucleotide = A | C | G | T deriving (Bounded, Enum, Eq, Ord, Read, Show)
type Sequence = [Nucleotide]
-- | Accumulates a list of associat... | fgrsnau/emgene | src/PWM.hs | mit | 3,145 | 0 | 11 | 607 | 821 | 441 | 380 | 41 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Main where
import Control.Monad.State.Strict
import qualified Control.Monad.State.Lazy as SL
import Data.Function (on)
import Data.List (nub, nubBy)
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified MiniSet ... | nh2/haskell-ordnub | ordnub.hs | mit | 12,905 | 0 | 18 | 3,474 | 3,513 | 1,869 | 1,644 | 167 | 4 |
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Constellation.Types where
import Control.Applicative
import Control.Monad.Base
import Control.Monad.Error
import Control.Monad.Logger
import Control.Monad.Reader
import ... | ClassyCoding/constellation-server | src/Constellation/Types.hs | mit | 875 | 0 | 11 | 221 | 183 | 101 | 82 | -1 | -1 |
module Test.Week10 where
import Test.Tasty
import Test.Tasty.HUnit
import Week10
week10 :: TestTree
week10 = testGroup "Week 10 - Applicative functors, Part I"
[
exercise1
, exercise2
, exercise3
, exercise4
, exercise5
]
exercise1 =
testGroup "Exercise 1 - Parser Functor" [
testCase "Example ... | taylor1791/cis-194-spring | test/Test/Week10.hs | mit | 1,411 | 0 | 12 | 306 | 356 | 185 | 171 | 37 | 1 |
module Reforest.CompressionSpec where
import Test.Hspec
import Reforest
import qualified Data.Set as Set
import Test.HUnit
a `shouldBeSubsetOf` b =
assertBool (show a ++ " not subset of " ++ show b)
(Set.fromList a `Set.isSubsetOf` Set.fromList b)
genLangSet = Set.fromList . genLang
spec :: Spec
spec = do
... | gebner/reforest | test/Reforest/CompressionSpec.hs | mit | 767 | 0 | 17 | 177 | 283 | 138 | 145 | 19 | 1 |
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE InstanceSigs #-}
import Network.HTTP
--import Network.HTTP.Conduit
import Control.Concurrent.Async
import Text.Printf
import Control.Exception
import System.CPUTime
-- loop :: Int -> IO ()
-- loop i =
-- if i == 0 then do
-- pu... | eulerfx/learnfp | http.hs | mit | 1,155 | 0 | 18 | 273 | 287 | 150 | 137 | 25 | 2 |
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Handler.Models where
import Cache
import Import hiding (intercalate, (<>))
import Form
import Data.List (nub)
import SessionState
import Data.Monoid
import Database.Persist.Types
import Database.Persist.Sql
... | swamp-agr/carbuyer-advisor | Handler/Models.hs | mit | 1,744 | 0 | 18 | 448 | 490 | 266 | 224 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE ExplicitForAll #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE InstanceSigs #-}
module Foundation where
im... | Happy0/liscrabble | src/Foundation.hs | gpl-2.0 | 11,119 | 0 | 16 | 2,559 | 1,621 | 876 | 745 | -1 | -1 |
{-# LANGUAGE CPP, MultiParamTypeClasses, TypeSynonymInstances
, FlexibleInstances #-}
{- |
Module : $Header$
Description : Instance of class Logic for SoftFOL.
Copyright : (c) Rene Wagner, Klaus Luettich, Uni Bremen 2005-2007
License : GPLv2 or higher, see LICENSE.txt
Maintainer : luecke@informatik.... | nevrenato/HetsAlloy | SoftFOL/Logic_SoftFOL.hs | gpl-2.0 | 3,725 | 0 | 24 | 1,002 | 728 | 393 | 335 | 61 | 0 |
{-# OPTIONS -O2 -Wall #-}
module Editor.CodeEdit.NextArg(makeAddArgHandler)
where
import Data.Store.IRef (IRef)
import Data.Store.Transaction (Transaction)
import Editor.Anchors (ViewTag)
import Editor.MonadF (MonadF)
import qualified Data.Store.Property as Property
import qualified Data.Store.Transaction as Transacti... | nimia/bottle | codeedit/Editor/CodeEdit/NextArg.hs | gpl-3.0 | 2,163 | 0 | 18 | 324 | 608 | 322 | 286 | 46 | 3 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module LinearForm where
import Data.Ratio
import Math.ExpPairs.LinearForm
import Math.ExpPairs.RatioInf
import Test.Tasty
import Test.Tasty.SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Instances ()
extractCoeffs :: Num t => LinearForm t -> (t, t, t)
extrac... | Bodigrim/exp-pairs | tests/LinearForm.hs | gpl-3.0 | 3,107 | 0 | 13 | 646 | 1,225 | 647 | 578 | 67 | 2 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.ITCH.NASDAQ.NASDAQ50.Messages where
import Control.DeepSeq
import Data.Word
import qualified Data.Binary as S
import qualified Data.Binary.Get as S
import qualified Data.Binary.Put as S
import qualified Data.ByteStr... | mjansen/itch | src/Data/ITCH/NASDAQ/NASDAQ50/Messages.hs | gpl-3.0 | 25,112 | 0 | 23 | 7,404 | 5,028 | 2,774 | 2,254 | 471 | 1 |
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
---------------------------------... | mzini/TcT | source/Tct/Method/Timeout.hs | gpl-3.0 | 3,818 | 0 | 15 | 1,064 | 877 | 473 | 404 | 61 | 1 |
module Crepuscolo.Highlight.DSL
( (|||)
, inside
, region
, match
, keyword
) where
import Crepuscolo.Highlight
import Text.Regex.PCRE ((=~), getAllMatches)
(|||) :: Highlighter -> Highlighter -> Highlighter
a ||| b = a . b
inside :: String -> Highlighter -> Highlighter
inside group highlight... | meh/crepuscolo | src/Crepuscolo/Highlight/DSL.hs | gpl-3.0 | 2,403 | 0 | 17 | 779 | 804 | 434 | 370 | 52 | 5 |
module Base.InputHandler(keyDown, keyUp, handleEvents) where
import qualified SDL
keyDown :: SDL.Scancode -> [SDL.Scancode] -> Bool
keyDown = elem
keyUp :: SDL.Scancode -> [SDL.Scancode] -> Bool
keyUp = notElem
press :: SDL.Scancode -> [SDL.Scancode] -> [SDL.Scancode]
press sym [] = [sym]
press sym (x:xs) = if x ==... | mdietz94/asteroids | src/Base/InputHandler.hs | gpl-3.0 | 1,073 | 0 | 16 | 253 | 437 | 230 | 207 | 24 | 5 |
; Copyright (C) 2009 Bhanu Chetlapalli
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
; This program is distribut... | chbhanukalyan/hcos | src/boot/harddisk.hs | gpl-3.0 | 2,864 | 158 | 19 | 395 | 995 | 535 | 460 | -1 | -1 |
{-# 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 #-}
-- ... | olorin/amazonka | amazonka-iam/gen/Network/AWS/IAM/ListGroupsForUser.hs | mpl-2.0 | 7,103 | 0 | 14 | 1,516 | 991 | 587 | 404 | 112 | 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/RegionCommitments/List.hs | mpl-2.0 | 7,583 | 0 | 20 | 1,660 | 831 | 495 | 336 | 120 | 1 |
{-# OPTIONS_GHC -Wall #-}
{-# LANGUAGE GeneralizedNewtypeDeriving, TypeSynonymInstances, FlexibleInstances, UnicodeSyntax #-}
module Calculator where
import ExprT as E
import Parser (parseExp)
import StackVM as S
eval ∷ ExprT → Integer
eval (E.Lit n) = n
eval (E.Mul x y) = eval x * eval y
eval (E.Add x y) = eval x... | spanners/cis194 | 05-type-classes/calculator.hs | unlicense | 2,051 | 0 | 10 | 510 | 886 | 474 | 412 | 66 | 1 |
module Main where
import Control.Concurrent
import AIM.OpenAuth
import AIM.Client
import AIM.Boss
import AIM.Oscar
import System.IO
getScreenName :: IO (String)
getScreenName = do
putStr "AIM Screen Name> "
hFlush stdout
getLine
getPassword :: IO (String)
getPassword = do
putStr "AIM Password> "
hFlush st... | chrismoos/haskell-aim-client | src/Main.hs | apache-2.0 | 1,145 | 8 | 15 | 211 | 326 | 150 | 176 | 45 | 3 |
{-
Copyright 2010-2012 Cognimeta Inc.
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 agreed to in writ... | Cognimeta/cognimeta-utils | src/Cgm/Prelude.hs | apache-2.0 | 2,373 | 0 | 7 | 397 | 571 | 379 | 192 | 47 | 1 |
{- |
Module : Bio.Motions.Callback.Periodic
Description : Contains the Periodic callback transformer
License : Apache
Stability : experimental
Portability : unportable
-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE Fl... | Motions/motions | src/Bio/Motions/Callback/Periodic.hs | apache-2.0 | 2,571 | 0 | 13 | 539 | 473 | 256 | 217 | 46 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.