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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
--
-- Copyright 2014, NICTA
--
-- This software may be distributed and modified according to the terms of
-- the BSD 2-Clause license. Note that NO WARRANTY is provided.
-- See "LICENSE_BSD2.txt" for details.
--
-- @TAG(NICTA_BSD)
--
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
module CapDL... | smaccm/capDL-tool | CapDL/PrintUtils.hs | bsd-2-clause | 10,632 | 2 | 14 | 2,221 | 4,114 | 2,045 | 2,069 | 243 | 15 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : QStyleOptionGraphicsItem.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:20
Warning : this file is machine gen... | keera-studios/hsQt | Qtc/Gui/QStyleOptionGraphicsItem.hs | bsd-2-clause | 5,799 | 0 | 12 | 741 | 1,324 | 681 | 643 | -1 | -1 |
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE RankNTypes #-}
module Arbitrary.Arbitrary
( Arbitrary1(..), genNel, smaller, maybeGen, genScope, genVar
) where
import Bound
import Control.Applicative
import Data.List.NonEmpty hiding (fromList)
import Data.Map
import Data.Monoid
import Data.Void
import Prelude.Ext... | PipocaQuemada/ermine | tests/properties/Arbitrary/Arbitrary.hs | bsd-2-clause | 2,836 | 0 | 12 | 557 | 988 | 508 | 480 | 50 | 1 |
-- http://www.codewars.com/kata/5410c0e6a0e736cf5b000e69
module Hamming where
hamming :: String -> String -> Int
hamming a b = length $ filter id $ zipWith (/=) a b
| Bodigrim/katas | src/haskell/6-Hamming-Distance.hs | bsd-2-clause | 166 | 0 | 7 | 26 | 48 | 26 | 22 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Routes where
import Control.Applicative
import Control.Monad.Except (ExceptT, forM_, runExceptT, liftIO, throwError, when)
import qualified Data.Aeson as Json
import qualified Data.Binary as Binary
import qualified Data.ByteString.Char8 as BS
import qualified Data.ByteString.L... | mgold/package.elm-lang.org | src/backend/Routes.hs | bsd-3-clause | 10,942 | 17 | 25 | 2,748 | 2,673 | 1,308 | 1,365 | 242 | 5 |
{-# LANGUAGE OverloadedStrings #-}
module Main where
import SlackBot.Config
import SlackBot.Bot
main :: IO ()
main = readConf "bot.cfg" >>= run
| Lepovirta/slackbot | src/Main.hs | bsd-3-clause | 146 | 0 | 6 | 23 | 37 | 21 | 16 | 6 | 1 |
{-# LANGUAGE TypeOperators, MultiParamTypeClasses, FunctionalDependencies #-}
{-# LANGUAGE BangPatterns #-}
-- | This module provides data structures for Ethernet frames
-- as well as parsers and unparsers for Ethernet frames.
module Nettle.Ethernet.EthernetFrame (
-- * Data types
EthernetFrame(..)
, Ethern... | brownsys/nettle-openflow | src/Nettle/Ethernet/EthernetFrame.hs | bsd-3-clause | 10,089 | 46 | 21 | 3,029 | 2,171 | 1,156 | 1,015 | 227 | 7 |
{-# LANGUAGE TypeOperators, TemplateHaskell #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Dimensions.SI
-- Copyright : (C) 2013 Richard Eisenberg
-- License : BSD-style (see LICENSE)
-- Maintainer : Richard Eisenberg (rae@cs.brynmawr.edu)
-- Sta... | goldfirere/units | units-defs/Data/Dimensions/SI.hs | bsd-3-clause | 3,189 | 0 | 7 | 930 | 408 | 241 | 167 | 44 | 0 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[TcBinds]{TcBinds}
-}
{-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-}
{-# LANGUAGE FlexibleContexts #-}
module TcBinds ( tcLocalBinds, tcTopBinds, tcRecSelBinds,
tcValBinds, tcHsBootSigs, tc... | vTurbine/ghc | compiler/typecheck/TcBinds.hs | bsd-3-clause | 74,628 | 0 | 19 | 22,559 | 11,759 | 6,161 | 5,598 | 820 | 8 |
module Main where
import Control.Monad.Reader (runReaderT)
import Lib
import qualified Options.Applicative as OA
main :: IO ()
main = do
cmd <- OA.execParser (OA.info (OA.helper <*> programOpts) programInfo)
runReaderT (interpret cmd) defaultGlobalOptions
| muhbaasu/pfennig-cli | app/Main.hs | bsd-3-clause | 283 | 0 | 13 | 59 | 86 | 47 | 39 | 8 | 1 |
{-# LANGUAGE TypeFamilies #-}
import Bitmap
import Control.Applicative
import Control.Arrow
data RGB8 = RGB8 Int Int Int deriving (Show, Eq, Ord)
data Image = Image { imageX :: Int, imageY :: Int, getImg :: [[RGB8]] } deriving Show
instance TwoDImage Image where
type TwoDImageColor Image = RGB8
new c w h = return ... | YoshikuniJujo/binary-file | examples/testBitmap.hs | bsd-3-clause | 1,158 | 2 | 14 | 234 | 500 | 268 | 232 | -1 | -1 |
-- | Defines a monad for transfer functions.
module Language.Python.TypeInference.Analysis.TFMonad (
goFlowInsensitive,
TFState,
TF,
simpleTransferFunction,
callTransferFunction,
getType,
getTypeWithDefault,
setType,
removeType,
getAllFromL,
removeFromL,
extractFromL,
... | lfritz/python-type-inference | python-type-inference/src/Language/Python/TypeInference/Analysis/TFMonad.hs | bsd-3-clause | 10,458 | 19 | 25 | 3,535 | 2,778 | 1,401 | 1,377 | 186 | 8 |
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-|
Module : Game.GoreAndAsh.Sync
Description : Gore&Ash high-level networking core module
Copyright : (c) Anton Gushcha, 2015-2016
License : BSD3
Maintainer : ncrashed@gmail.com
Stability : experimental
Portability : POSIX
The core module contains high-level ... | Teaspot-Studio/gore-and-ash-sync | src/Game/GoreAndAsh/Sync.hs | bsd-3-clause | 2,096 | 0 | 5 | 383 | 224 | 158 | 66 | 57 | 0 |
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# ... | bhamrick/fixalgs | Data/FAlgebra/Tree.hs | bsd-3-clause | 4,058 | 0 | 10 | 917 | 1,445 | 754 | 691 | 89 | 2 |
{-# LANGUAGE FlexibleContexts #-}
module Database.PostgreSQL.Simple.Lifted.Transaction
(
-- * Transaction handling
withTransaction
, withTransactionLevel
, withTransactionMode
, withTransactionSerializable
, withTransactionModeRetry
, begin
, beginMode
, beginLevel
, commit
, rollback
... | onurzdg/clicklac | src/Database/PostgreSQL/Simple/Lifted/Transaction.hs | bsd-3-clause | 4,447 | 0 | 17 | 1,295 | 1,064 | 571 | 493 | 124 | 3 |
{-# LANGUAGE TypeFamilies, TypeSynonymInstances, FlexibleInstances, MultiParamTypeClasses, FlexibleContexts, RankNTypes, GADTs, OverloadedStrings #-}
module QueryArrow.Cypher.BuiltIn where
import QueryArrow.Syntax.Term
import QueryArrow.Cypher.Cypher
import Data.Map.Strict (fromList)
import QueryArrow.ListUtils (subs... | xu-hao/QueryArrow | QueryArrow-db-cypher/src/QueryArrow/Cypher/BuiltIn.hs | bsd-3-clause | 5,614 | 0 | 24 | 2,017 | 1,847 | 1,026 | 821 | 89 | 6 |
{-# OPTIONS -fno-cse #-}
{-# LANGUAGE NamedFieldPuns #-}
-- -fno-cse is needed for GLOBAL_VAR's to behave properly
-----------------------------------------------------------------------------
--
-- GHC Driver
--
-- (c) The University of Glasgow 2005
--
-----------------------------------------------------------------... | hferreiro/replay | compiler/main/DriverPipeline.hs | bsd-3-clause | 98,996 | 3 | 31 | 34,515 | 16,063 | 8,127 | 7,936 | -1 | -1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ExistentialQuantification #-}
module ClassHierarchy where
import Ivory.Language
import Ivory.Compile.C.CmdlineFro... | Hodapp87/ivory | ivory-examples/examples/ClassHierarchy.hs | bsd-3-clause | 2,709 | 0 | 13 | 580 | 510 | 267 | 243 | 45 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
import Test.QuickCheck
import Algebra
import Data.List (nub)
import System.Random (Random(..))
import Data.Text (Text)
import qualified Data.Text as T (pack)
import Data.Time (fromGregorian)
import Data.Time.Clock (UTCTime(..), secondsToDiffTime)
import Control.Monad (replicateM)... | JAnthelme/relation-tool | test/Spec.hs | bsd-3-clause | 9,557 | 0 | 16 | 2,630 | 3,016 | 1,582 | 1,434 | 157 | 2 |
module Lexer
( lexMap,
LexHgram
) where
import qualified Data.Text as T
import qualified Data.Map as M
import Text.Parsec
import Data.Char
import Data.List
type LexHgram = M.Map T.Text Int
lexMap :: T.Text -> LexHgram
lexMap t = case parse lexer "" t of
(Left err) -> M.empty
(Right l) -> M.fromLis... | mmx1/tokenGen | src/Lexer.hs | bsd-3-clause | 754 | 0 | 16 | 147 | 291 | 157 | 134 | 21 | 2 |
{-# LANGUAGE DeriveGeneric, KindSignatures, TemplateHaskell,
QuasiQuotes, FlexibleInstances, TypeOperators, TypeSynonymInstances,
MultiParamTypeClasses, FunctionalDependencies, OverlappingInstances,
ScopedTypeVariables, EmptyDataDecls, DefaultSignatures, ViewPatterns,
UndecidableInstances, FlexibleContexts... | jfischoff/minimal-resource-protocol | src/MRP/Commands.hs | bsd-3-clause | 2,606 | 0 | 11 | 759 | 444 | 272 | 172 | 63 | 0 |
-- | Dynamically lookup up values from modules and loading them.
module DynamicLoading (
#ifdef GHCI
-- * Force loading information
forceLoadModuleInterfaces,
forceLoadNameModuleInterface,
forceLoadTyCon,
-- * Finding names
lookupRdrNameInModule,
... | nomeata/ghc | compiler/main/DynamicLoading.hs | bsd-3-clause | 8,124 | 0 | 24 | 2,110 | 1,446 | 763 | 683 | 1 | 0 |
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
import Data.Either (isLeft)
import Data.Map (fromList)
import Test.Hspec (Spec, describe, it, shouldBe, shouldSatisfy)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import DNA (count, nucleotideCounts)
main :: IO ()
main = hspecW... | vaibhav276/exercism_haskell | nucleotide-count/test/Tests.hs | mit | 2,230 | 0 | 14 | 953 | 487 | 267 | 220 | 42 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PartialTypeSignatures #-}
{-# LANGUAGE RankNType... | deepfire/mood | experiments/lifted-record-holotree/Main.hs | agpl-3.0 | 3,815 | 4 | 19 | 1,157 | 1,091 | 593 | 498 | 79 | 1 |
-- Copyright (C) 2016 Red Hat, Inc.
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library i... | atodorov/bdcs | src/BDCS/KeyValue.hs | lgpl-2.1 | 4,106 | 0 | 17 | 1,092 | 849 | 459 | 390 | -1 | -1 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings #-}
module Stack.Constants.Config
( distDirFromDir
, workDirFromDir
, distRelativeDir
, imageStagingDir
, projectDockerSandboxDir
, configCacheFile
, configCabalMod
, buildCacheFile
, testSuccessFile
,... | MichielDerhaeg/stack | src/Stack/Constants/Config.hs | bsd-3-clause | 5,012 | 0 | 13 | 1,226 | 1,238 | 640 | 598 | 116 | 2 |
module Generate.JavaScript.Ports (incoming, outgoing) where
import qualified Data.List as List
import Generate.JavaScript.Helpers
import AST.Type as T
import qualified AST.Variable as Var
import Language.ECMAScript3.Syntax
data JSType
= JSNumber
| JSBoolean
| JSString
| JSArray
| JSObject [String... | avh4/elm-compiler | src/Generate/JavaScript/Ports.hs | bsd-3-clause | 6,496 | 0 | 20 | 2,340 | 2,298 | 1,118 | 1,180 | 155 | 10 |
module SubHask.Category.HMatrix
where
import GHC.Prim
import Control.DeepSeq
import Data.Typeable
import qualified Prelude as P
import qualified Data.Vector.Generic as VG
import qualified Data.Vector.Generic.Mutable as VGM
import qualified Data.Vector.Storable as VS
import qualified Numeric.LinearAlgebra as LA
i... | abailly/subhask | src/SubHask/Category/HMatrix.hs | bsd-3-clause | 652 | 0 | 9 | 78 | 142 | 92 | 50 | -1 | -1 |
main = drawingOf(path[start, end])
start :: Point
start = (0, 0)
end :: Point
end = [2, -4]
| three/codeworld | codeworld-compiler/test/testcase/test_pointType/source.hs | apache-2.0 | 94 | 0 | 8 | 20 | 55 | 32 | 23 | 5 | 1 |
module Inter.Logged where
-- $Id$
import qualified Control.SQL
import System.IO
logged :: String -> IO a -> IO a
logged msg act = do
Control.SQL.logged ( msg ++ " ..." )
x <- act
Control.SQL.logged ( "... " ++ msg )
return x
| Erdwolf/autotool-bonn | trial/src/Inter/Logged.hs | gpl-2.0 | 248 | 0 | 9 | 66 | 92 | 47 | 45 | 9 | 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="ru-RU">
<title>Правила пассивного сканирования — бета-версия | ZAP-расширение </title>
<maps>
... | thc202/zap-extensions | addOns/pscanrulesBeta/src/main/javahelp/org/zaproxy/zap/extension/pscanrulesBeta/resources/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 1,091 | 78 | 69 | 162 | 570 | 284 | 286 | -1 | -1 |
import Data.List
main :: IO ()
main = print $ length $ show (foldl' (*) 1 [1..100000] :: Integer)
| ghc-android/ghc | testsuite/tests/perf/space_leaks/space_leak_001.hs | bsd-3-clause | 100 | 0 | 9 | 21 | 52 | 28 | 24 | 3 | 1 |
{-
Copyright (C) 2012 Christopher Walker <http://gsd.uwaterloo.ca>
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, m... | juodaspaulius/clafer-old-customBNFC | src/Language/Clafer/Generator/Graph.hs | mit | 20,265 | 0 | 19 | 5,018 | 5,302 | 2,694 | 2,608 | 213 | 7 |
module RenameMeToo where
import {-# SOURCE #-} RenameMe
data Even = Zero | Odd Odd
y = False
| antalsz/hs-to-coq | examples/tests/RenameMeToo.hs | mit | 97 | 0 | 6 | 22 | 25 | 16 | 9 | 4 | 1 |
{-# LANGUAGE NamedFieldPuns #-}
module Game.World.Gen.Frequency
( getDistribution
, roomTypeFreqDist
, roomSizeFreqDist
)
where
import System.Random
import Data.Maybe
import Game.World.Gen.Types
import Control.Lens
data FreqDist a b = FreqDist
{ freqDist :: [(a, b)]
}
getDistribution :: (Sho... | mfpi/q-inqu | Game/World/Gen/Frequency.hs | mit | 1,664 | 0 | 12 | 491 | 634 | 350 | 284 | 50 | 3 |
module InterBasics where
import Data.Char
type Input = [String]
type Output = [String]
type RawInput = [Char]
type RawOutput = [Char]
{-
Contains various auxilliary functions and definitions for
Input/output
Version 1.0 18 S... | simonjohnthompson/Interaction | InterBasics.hs | mit | 6,103 | 0 | 12 | 2,566 | 1,122 | 587 | 535 | 79 | 2 |
module Data.Monetary.USD where
-- Representation of US dollars as rational numbers
-- 2015-12-07: Corrected read parse errors for stupid (AAPL) numbers like: $.12
import qualified Data.ByteString.Char8 as B
import Data.Monoid
import Control.Presentation
import Data.Monetary.Currency
import Database.PostgreSQL.Simpl... | geophf/1HaskellADay | exercises/HAD/Data/Monetary/USD.hs | mit | 1,967 | 0 | 10 | 396 | 601 | 310 | 291 | 38 | 1 |
module Language.Brainfuck.Py2Bf.BfpointerSpec where
import Test.Hspec
import Language.Brainfuck.Py2Bf.Bf
import Language.Brainfuck.Py2Bf.Bfpointer
spec :: Spec
spec =
describe "Bfpcode"
runSpec
hello :: Bfpcode
hello = Bfpcode
[ Addp 0 9
, Whilep 0 [ Addp 1 8, Addp 2 11, Addp 3 5, Addp 0 (-1) ]
... | itchyny/py2bf.hs | test/Language/Brainfuck/Py2Bf/BfpointerSpec.hs | mit | 709 | 0 | 11 | 201 | 325 | 173 | 152 | 23 | 1 |
module Main (main) where
import qualified Examples.Rpc.CalculatorClient
import qualified Examples.Rpc.CalculatorServer
import qualified Examples.Rpc.EchoClient
import qualified Examples.Rpc.EchoServer
import qualified Examples.Serialization.HighLevel.Read
import qualified Examples.Serialization.HighLevel.Write
import ... | zenhack/haskell-capnp | examples/cmd/Main.hs | mit | 1,695 | 0 | 12 | 438 | 321 | 197 | 124 | 42 | 9 |
module Haskeleton.TestBench (benchmarks) where
import Haskeleton.Test
import Criterion
benchmarks :: [Benchmark]
benchmarks =
[ bench "main" (nfIO main)
]
| Moredread/haskeleton-test | benchmark/Haskeleton/TestBench.hs | mit | 166 | 0 | 8 | 30 | 46 | 27 | 19 | 6 | 1 |
{-# htermination eltsFM_LE :: (Ord a, Ord k) => FiniteMap (Either a k) b -> (Either a k) -> [b] #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_eltsFM_LE_10.hs | mit | 117 | 0 | 3 | 23 | 5 | 3 | 2 | 1 | 0 |
{-# htermination minusFM :: FiniteMap Float b1 -> FiniteMap Float b2 -> FiniteMap Float b1 #-}
import FiniteMap
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/FiniteMap_minusFM_6.hs | mit | 112 | 0 | 3 | 18 | 5 | 3 | 2 | 1 | 0 |
module Battleship.Swallow.Test
(swallowSuite)
where
import Test.Tasty (testGroup, TestTree)
import Test.Tasty.HUnit
import Battleship.Swallow
swallowSuite :: TestTree
swallowSuite = testGroup "Swallow"
[testCase "swallow test" testSwallow]
testSwallow :: Assertion
testSwallow = "something" @=? swallow "some" ... | sgrove/battlehaskell | test/Battleship/Swallow/Test.hs | mit | 328 | 0 | 7 | 43 | 78 | 45 | 33 | 10 | 1 |
{-# LANGUAGE PatternSynonyms #-}
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module JSDOM.Generated.AudioNode
(connect, connectParam, disconnect, getContext, getNumberOfInputs,
getNumberOfOutputs, setChann... | ghcjs/jsaddle-dom | src/JSDOM/Generated/AudioNode.hs | mit | 5,634 | 0 | 13 | 1,063 | 1,249 | 690 | 559 | 95 | 1 |
{-|
Module: Y2015.D16
Description: Advent of Code Day 16 Solutions.
License: MIT
Maintainer: @tylerjl
Solutions to the day 16 set of problems for <adventofcode.com>.
-}
module Y2015.D16 (findAunt, findRealAunt) where
import Data.List (maximumBy)
import Data.Map.Strict (Map, differenceWith, differenceWithKe... | tylerjl/adventofcode | src/Y2015/D16.hs | mit | 2,070 | 0 | 10 | 580 | 544 | 289 | 255 | 34 | 5 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-|
Module : Network.WebexTeams
Copyright : (c) Naoto Shimazaki 2017,2018
License : MIT (see the file LICENSE)
Maintainer : https://github.com/nshimaza
Stability : experimental
This module provides types and functions for accessing C... | nshimaza/cisco-spark-api | webex-teams-api/src/Network/WebexTeams.hs | mit | 23,047 | 0 | 20 | 5,336 | 3,369 | 1,862 | 1,507 | 316 | 2 |
module MarkovChain
( runMarkovChain
, step
, stepUntilAbsorption
, SystemState
, MarkovChain
) where
import Control.Monad.Reader
import Data.Matrix
import TransitionMatrix
import MC
type SystemState = Int
type MarkovChain = ReaderT TransitionMatrix MC
-- | Take one step: transition from a state to another
step :: ... | arekfu/markov-chains | src/MarkovChain.hs | mit | 970 | 0 | 14 | 202 | 289 | 146 | 143 | 29 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import MPD
import MPD.Core
import MPD.Commands.Parser
import Control.Applicative
import qualified Data.Attoparsec.ByteString as A
import qualified Data.ByteString as SB
import Criterion.Main
main = defaultMain [
bench "boolP" $
nf (A.parseOnly b... | joachifm/nanompd | bench/ParseBench.hs | mit | 1,084 | 0 | 16 | 294 | 352 | 180 | 172 | 30 | 1 |
{-# htermination show :: (Show a, Show k) => (Either a k) -> String #-}
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/full_haskell/Prelude_show_11.hs | mit | 72 | 0 | 2 | 15 | 3 | 2 | 1 | 1 | 0 |
import System.IO
import System.Exit
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.SetWMName
import XMonad.Layout.Fullscreen
import XMonad.Layout.NoBorders
import XMonad.Layout.Spiral
import XMonad.Layout.Tabbed
import XMonad.Util.Run(s... | black-puppydog/dotfiles_crvs | xmonad.symlink/xmonad.darrhya.hs | mit | 11,104 | 0 | 16 | 2,300 | 1,813 | 1,113 | 700 | 152 | 1 |
{-# LANGUAGE StandaloneDeriving, ViewPatterns #-}
-----------------------------------------------------------------------------
-- |
-- Module : Mezzo.Model.Types
-- Description : Mezzo music types
-- Copyright : (c) Dima Szamozvancev
-- License : MIT
--
-- Maintainer : ds709@cam.ac.uk
-- Stability ... | DimaSamoz/mezzo | src/Mezzo/Model/Types.hs | mit | 37,677 | 0 | 13 | 9,488 | 11,980 | 6,354 | 5,626 | -1 | -1 |
{-# htermination (succChar :: Char -> Char) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Char = Char MyInt ;
data MyInt = Pos Nat | Neg Nat ;
data Nat = Succ Nat | Zero ;
primCharToInt :: Char -> MyInt;
primCharToInt (Char x) = x;
fromEnumChar :: Cha... | ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/succ_4.hs | mit | 1,381 | 0 | 13 | 309 | 622 | 332 | 290 | 35 | 1 |
import Haste
import Haste.Prim
import Haste.Foreign
import Haste.DOM
import Haste.Events
import Haste.Ajax
import Control.Monad
import Control.Applicative
clearBox box val _ = do
s <- getProp box "value"
if s == val
then setProp box "value" "" >> return ()
else return ()
fillBox box val _ = do
s ... | sqd/NNEZArtFestival2015Sys | backend/frontend/e/ads_apply.hs | mit | 1,960 | 0 | 11 | 358 | 660 | 324 | 336 | 47 | 2 |
module Algebra.Rewriting where
import Algebra.Base
import Algebra.Display
import Algebra.Suspension
import Algebra.Symbol
import Data.List ( intersperse )
import Data.Map ( Map )
import qualified Data.Map as Map
import Util.Display
import Util.Numeric
import Util.String.Align
import qualified Util.Unicode as U
import... | sgord512/Algebra | Algebra/Rewriting.hs | mit | 2,677 | 0 | 16 | 957 | 1,015 | 528 | 487 | 55 | 1 |
module Primitive where
import Numerical
import Vec3
import Ray
import Material
import Container
import Data.List
import Data.Maybe
import Control.Applicative
import Control.DeepSeq
data Primitive = Sphere { surface :: C3 Material
, isSource :: Bool
, ... | reuk/rayverb | src/Primitive.hs | gpl-2.0 | 3,846 | 0 | 12 | 1,739 | 1,205 | 649 | 556 | 86 | 3 |
-- No main, hsExpand should not accept this.
fib 0 = 1
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
| uvthenfuv/HsExpand | tests/test2.hs | gpl-2.0 | 96 | 0 | 8 | 25 | 50 | 25 | 25 | 3 | 1 |
module Language.Pepa.Transform.Rules.Apply
( applyRulesToModel )
where
{- Standard Library Modules Imported -}
import Control.Monad
( foldM )
import qualified Data.Map as Map
import Data.Map
( Map )
{- External Library Modules Imported -}
{- Local Modules Imported -}
import Language.Pepa.Transform.Rules.Syntax
... | allanderek/ipclib | Language/Pepa/Transform/Rules/Apply.hs | gpl-2.0 | 20,562 | 0 | 17 | 5,612 | 3,358 | 1,732 | 1,626 | 257 | 37 |
{-# LANGUAGE TemplateHaskell, DeriveDataTypeable #-}
module SAT.Param where
-- $Id$
import SAT.Types
import Autolib.Reader
import Autolib.ToDoc
import Autolib.Set
import Data.Typeable
data Param =
Param { vars :: Set Variable
, clauses :: Int -- ^ anzahl (empfohlen: 3.5 * variablen)
}
derivi... | Erdwolf/autotool-bonn | src/SAT/Param.hs | gpl-2.0 | 614 | 4 | 14 | 158 | 187 | 105 | 82 | 16 | 1 |
-- 18/03/16
-- Lorenzo Jose Lamas
-- Algebra I
-- Labo
--
suma x y = x + y
doble x = 2* x
normaVectorial v1 v2 = sqrt (v1^2 + v2^2)
funcionConstante8 x = 8
respuestaATodo = 42
-- Primera parte todo piola !
unoSiCero n | n == 0 = 1
| otherwise= 0
-- Medio compliqueti la sintaxis jajaj
signo n | n > 0 = 1
| n =... | lorenzojlamas/ejercicios | 1.hs | gpl-3.0 | 1,242 | 0 | 14 | 363 | 703 | 350 | 353 | 37 | 1 |
module Main (main) where
import Options.Applicative
import Data.Monoid ((<>))
import Folgerhs.Stage
import Folgerhs.Speakers (speakers)
import Folgerhs.Presence (presence)
import Folgerhs.Animate (animation)
data Config = Presence FilePath Bool
| Speakers FilePath
| Animate FilePath Int Bool ... | SU-LOSP/folgerhs | app/Folgerhs/Main.hs | gpl-3.0 | 2,056 | 0 | 13 | 625 | 518 | 259 | 259 | 57 | 1 |
{-|
Module : Parameter
Description : PhotoVideotex parameter generator
Copyright : (c) Frédéric BISSON, 2014
License : GPL-3
Maintainer : zigazou@free.fr
Stability : experimental
Portability : POSIX
This module allows to generate parameters for photo videotex. All parameters
are not useful with the Minit... | Zigazou/HaMinitel | src/Minitel/Generate/Photo/Parameter.hs | gpl-3.0 | 11,461 | 0 | 12 | 3,161 | 2,204 | 1,192 | 1,012 | 240 | 5 |
module Examples where
import Triangulation
import TriangulationCxtObject
import StandardCoordinates
import Data.TrieSet as Set
import FaceLattice
import ParseJvx
-- | Figure 1 in "Normal surfaces in topologically finite 3-manifolds (Tillmann)"
fig1 :: Triangulation
fig1 = triang [( 0 ./ tABD, 0 ./ oBCD)]
eightComp... | DanielSchuessler/hstri | Examples.hs | gpl-3.0 | 7,696 | 0 | 9 | 3,023 | 3,461 | 2,046 | 1,415 | 205 | 1 |
module Export
(
writeMatlabFile
) where
import System.IO
import Text.Printf
writeMatlabFile :: String -> [(Double, Double, Double)] -> IO ()
writeMatlabFile fileName dynamics = do
fileHdl <- openFile fileName WriteMode
hPutStrLn fileHdl "dynamics = ["
mapM_ (hPutStrLn fileHdl . sirAggregateToString) dy... | thalerjonathan/phd | coding/papers/pfe/testing/src/Export.hs | gpl-3.0 | 1,741 | 0 | 10 | 271 | 333 | 149 | 184 | 37 | 1 |
{-# OPTIONS_GHC -XFlexibleInstances -XTypeSynonymInstances #-}
{- Channel basics for HSH
Copyright (C) 2004-2008 John Goerzen <jgoerzen@complete.org>
Please see the COPYRIGHT file
-}
{- |
Module : HSH.Channel
Copyright : Copyright (C) 2006-2009 John Goerzen
License : GNU LGPL, version 2.1 or above
... | jgoerzen/hsh | HSH/Channel.hs | lgpl-2.1 | 2,663 | 0 | 11 | 673 | 572 | 301 | 271 | 48 | 4 |
-- DyreExample.hs --
module DyreExample ( dyreExample ) where
import qualified Config.Dyre as Dyre
confError cfgMessage error = "Error:" ++ error ++ "\n" ++ cfgMessage
realMain message = do
putStrLn "Entered Main Function"
putStrLn message
dyreExample = Dyre.wrapMain Dyre.defaultParams
{ Dyre.projectName = "... | dmp1ce/dyreExampleCabal | src/DyreExample.hs | unlicense | 404 | 0 | 7 | 76 | 98 | 54 | 44 | 10 | 1 |
module LSystem.Interprets (
InterpretFunc,
InterpretFuncMapped,
avibleInterprets,
InterpretInstruction(..),
InstructionMap,
parseIMap,
interpretLSystemRaw
) where
import Data.Map
import Data.Char
import Data.Maybe
import LSystem.Utils
import LSystem.DataTypes
import LSystem.Expressions (isT... | NightElfik/L-systems-in-Haskell | src/LSystem/Interprets.hs | unlicense | 12,803 | 0 | 22 | 3,213 | 2,875 | 1,524 | 1,351 | 208 | 13 |
-- Copyright 2020 Google LLC
--
-- 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 ... | google/cabal2bazel | bzl/tests/hierarchical/Sub/FooTest.hs | apache-2.0 | 684 | 0 | 7 | 119 | 52 | 36 | 16 | 4 | 1 |
data RPS = Rock | Paper | Scissors
shoot :: RPS -> RPS -> String
shoot Paper Rock = "Paper Beats Rock"
shoot Rock Scissors = "Rock Beats Scissors"
shoot Scissors Paper = "Scissors Beats Paper"
shoot Scissors Rock = "Scissors Loses to Rock "
shoot Paper Scissors = "Paper Loses to Scissors"
shoot Rock Paper = "Rock... | hungaikev/learning-haskell | RockPaperScissors.hs | apache-2.0 | 357 | 0 | 6 | 72 | 97 | 50 | 47 | 9 | 1 |
{-# LANGUAGE CPP, ScopedTypeVariables #-}
module FileCons (Cons, openHandle, closeHandle, newCons, newInt, isPair, first, second, setFirst, setSecond, int, getPtr, list, toList, nth, shw, cmpr, cmpr2, encodeString, decodeString, dlookup, lookupSingle, dinsert, deleteFindMin, deleteFindMax, delete, depth, size) where... | jacinabox/Indexing | FileCons - Copy.hs | bsd-2-clause | 7,702 | 95 | 20 | 2,129 | 3,338 | 1,647 | 1,691 | -1 | -1 |
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.Raw.NV.TextureExpandNormal
-- Copyright : (c) Sven Panne 2013
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : porta... | mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/NV/TextureExpandNormal.hs | bsd-3-clause | 783 | 0 | 4 | 91 | 48 | 38 | 10 | 5 | 1 |
{-# LANGUAGE RankNTypes, NamedFieldPuns, RecordWildCards #-}
module Distribution.Server.Features.PackageCandidates (
PackageCandidatesFeature(..),
PackageCandidatesResource(..),
initPackageCandidatesFeature,
CandidateRender(..),
CandPkgInfo(..),
) where
import Distribution.Server.Framework
impo... | chrisdotcode/hackage-server | Distribution/Server/Features/PackageCandidates.hs | bsd-3-clause | 20,803 | 0 | 21 | 5,328 | 3,879 | 2,046 | 1,833 | 315 | 10 |
{-|
/NOTE/: This module is preliminary and may change at a future date.
This module is intended to help converting a list of tags into a
tree of tags.
-}
module Text.HTML.TagSoup.Tree
(
TagTree(..), tagTree, parseTree, parseTreeOptions, ParseOptions(..),
flattenTree, renderTree, renderTreeOpti... | ChristopherKing42/tagsoup | Text/HTML/TagSoup/Tree.hs | bsd-3-clause | 4,310 | 0 | 15 | 1,065 | 1,255 | 664 | 591 | 56 | 7 |
{-# LANGUAGE DoAndIfThenElse #-}
module ThetaReduction(thetaReduction) where
import Control.Applicative
import Data.List
import Term
import VarEnvironment
data MarkedTerm = MLam Int String MarkedTerm
| MApp MarkedTerm MarkedTerm
| MVar String
--deriving Show
-- Uses ... | projedi/type-inference-rank2 | src/ThetaReduction.hs | bsd-3-clause | 3,040 | 0 | 17 | 852 | 1,367 | 696 | 671 | 68 | 5 |
{-# language CPP #-}
-- | = Name
--
-- VK_KHR_maintenance4 - device extension
--
-- == VK_KHR_maintenance4
--
-- [__Name String__]
-- @VK_KHR_maintenance4@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 414
--
-- [__Revision__]
-- 2
--
-- [__Extension and Versi... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_KHR_maintenance4.hs | bsd-3-clause | 10,976 | 0 | 8 | 2,016 | 604 | 450 | 154 | -1 | -1 |
{-|
Module : Database.Relational.Delete
Description : Definition of DELETE_FROM.
Copyright : (c) Alexander Vieth, 2015
Licence : BSD3
Maintainer : aovieth@gmail.com
Stability : experimental
Portability : non-portable (GHC only)
-}
{-# LANGUAGE AutoDeriveTypeable #-}
module Database.Relational.Delete (
... | avieth/Relational | Database/Relational/Delete.hs | bsd-3-clause | 376 | 0 | 6 | 75 | 28 | 19 | 9 | 4 | 0 |
module Experiments.StateParser where
import Control.Monad.State.Lazy
data Token
= OpenParen
| CloseParen
| Letter Char
deriving (Eq, Show)
data AST
= Group [AST]
| Expression [Char]
deriving (Eq, Show)
type ParserState = State [Token] AST
charLex :: Char -> Token
charLex c =
case c of
... | rumblesan/haskell-experiments | src/Experiments/StateParser.hs | bsd-3-clause | 878 | 0 | 18 | 263 | 304 | 153 | 151 | 37 | 5 |
--
-- Finder.hs
--
module Finder where
import Data.ByteString.Char8 as BS (ByteString, hGetLine)
import Data.Map as Map (Map, elems, empty, insert, lookup)
import System.IO
import System.Process
type FingerPrint = ByteString
findSame :: [FilePath] -> IO [[FilePath]]
findSame fs = do
fps <- mapM getFingerPrint4 fs... | eijian/picfinder | src/Finder-r1.hs | bsd-3-clause | 1,219 | 0 | 13 | 292 | 476 | 251 | 225 | 31 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE LambdaCase #... | reflex-frp/reflex-dom | reflex-dom-core/src/Reflex/Dom/Old.hs | bsd-3-clause | 10,483 | 0 | 18 | 1,935 | 3,178 | 1,633 | 1,545 | -1 | -1 |
module Main where
import Graphics.Gloss
data Var = X | F | Plus | Minus | Lf | Rt deriving (Eq)
data Turtle = Turtle { position:: (Float, Float), angle:: Float} deriving (Show)
data Config = Config { graphic:: Turtle, history:: [Turtle] } deriving (Show)
class Changer a where
mutateConfig :: a -> Config -> Config
... | edoardo90/lsystem | src/FractalTree.hs | bsd-3-clause | 2,913 | 0 | 12 | 881 | 1,206 | 666 | 540 | 58 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Control.Alternative.Freer
( Alt
, runAlt
, liftAlt
, hoistAlt
, retractAlt
) where
import Control.Applicative
-- | A purely formal Alternative structure over a functor, where
-- no particular constraints are... | seagate-ssg/options-schema | src/Control/Alternative/Freer.hs | bsd-3-clause | 2,007 | 0 | 11 | 528 | 961 | 482 | 479 | 54 | 1 |
{-# language MultiParamTypeClasses, FlexibleInstances, FlexibleContexts, UndecidableInstances#-}
-- Finger tree half spine, amortized O(1) access to head (push/pop) , O(log n) access to elements (peek)
module HFT (F(E),push,pop,Peek(peek),P(..)) where
import Control.Applicative
import Data.List
import Data.Maybe
da... | paolino/hft | HFT.hs | bsd-3-clause | 1,750 | 0 | 17 | 563 | 944 | 476 | 468 | 56 | 3 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module SAWScript.Heapster.JudgmentTranslation.Examples (
testJudgmentTranslation,
) where
import Data.Functor.Const
import Data.Parameterized.Classes
i... | GaloisInc/saw-script | heapster-saw/src/Verifier/SAW/Heapster/archival/JudgmentTranslation/Examples.hs | bsd-3-clause | 9,844 | 0 | 21 | 1,681 | 1,651 | 873 | 778 | 146 | 1 |
module FRP.Sodium.GameEngine2D.Orientation where
data Orientation = OrientationUp
| OrientationDown
| OrientationLeft
| OrientationRight
| OrientationUpMirrored
| OrientationDownMirrored
| OrientationLeftMirrored
... | the-real-blackh/sodium-2d-game-engine | FRP/Sodium/GameEngine2D/Orientation.hs | bsd-3-clause | 410 | 0 | 6 | 165 | 55 | 34 | 21 | 10 | 0 |
module CaesarEncode where
import Data.Char (ord, chr)
caesarEncode :: Int -> String -> String
caesarEncode t = map f
where f c
| ord 'a' <= ord c && ord 'z' >= ord c = chr $ (t + ord c - ord 'a') `mod` 26 + ord 'a'
| ord 'A' <= ord c && ord 'Z' >= ord c = chr $ (t + ord c - ord 'A') `mod` 26 + ord '... | abhinav-mehta/CipherSolver | src/CaesarEncode.hs | bsd-3-clause | 342 | 2 | 15 | 108 | 191 | 92 | 99 | 8 | 1 |
--
-- AF.hs --- GPIO Alternate Function aliases
--
-- Copyright (C) 2013, Galois, Inc.
-- All Rights Reserved.
--
module Ivory.BSP.STM32F405.GPIO.AF where
import Ivory.BSP.STM32.Peripheral.GPIOF4.RegTypes
-- These are funky because i did it all with copy paste and regexps based on the
-- gpio.h in hwf4. Yeah, disgus... | GaloisInc/ivory-tower-stm32 | ivory-bsp-stm32/src/Ivory/BSP/STM32F405/GPIO/AF.hs | bsd-3-clause | 2,823 | 0 | 4 | 636 | 428 | 264 | 164 | 82 | 1 |
module Magic.Color
( CombColor (..)
, colorless
, colors
, Color1 (..)
, fromColor1
, Color2 (..)
, color2
, splitColor2
, fromColor2
) where
import Prelude
import Data.Maybe
-- CombColor
data CombColor = CombColor
{ isWhite :: Bool
, isBlue :: Bool
, isBlack :: Bool
, is... | mkut/libmtg | Magic/Color.hs | bsd-3-clause | 3,183 | 0 | 9 | 836 | 1,153 | 622 | 531 | 94 | 6 |
{-
This module offers a basic parse for the HaCoTeB project. It will create one
single AST node from the entire section containing all the text with no
mark-up and no formatting. Useful for debugging and as a safe fallback.
-}
module HaCoTeB.Parse.BasicParse (basicParse) where
import HaCoTeB.Types
basicParse :: [Str... | mihaimaruseac/HaCoTeB | src/HaCoTeB/Parse/BasicParse.hs | bsd-3-clause | 388 | 0 | 6 | 63 | 43 | 26 | 17 | 4 | 1 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE... | rolph-recto/liquid-fixpoint | src/Language/Fixpoint/Types/Sorts.hs | bsd-3-clause | 7,288 | 0 | 10 | 1,958 | 2,039 | 1,078 | 961 | 178 | 4 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- | This widget listens on DBus for Log events from XMonad and
-- displays the formatted status string. To log to this widget using
-- the excellent dbus-core library, use code like the following:
--
-- > import DBus.Client.S... | Undeterminant/taffybar | src/System/Taffybar/XMonadLog.hs | bsd-3-clause | 4,193 | 0 | 12 | 1,042 | 764 | 424 | 340 | 67 | 2 |
{-# LANGUAGE ExistentialQuantification #-}
{-# language DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE Un... | paul-rouse/persistent | persistent-postgresql/test/JSONTest.hs | mit | 30,939 | 0 | 32 | 10,584 | 6,842 | 3,524 | 3,318 | 448 | 1 |
{-# LANGUAGE TypeApplications #-}
module Lamdu.Sugar.Convert.PostProcess
( Result(..), def, expr
, makeScheme
) where
import qualified Control.Lens as Lens
import Data.Property (MkProperty')
import qualified Data.Property as Property
import Hyper
import Hyper.Syntax.Scheme (s... | lamdu/lamdu | src/Lamdu/Sugar/Convert/PostProcess.hs | gpl-3.0 | 3,092 | 0 | 26 | 947 | 760 | 417 | 343 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-elb/gen/Network/AWS/ELB/CreateLBCookieStickinessPolicy.hs | mpl-2.0 | 5,829 | 0 | 9 | 1,096 | 484 | 301 | 183 | 61 | 1 |
-- by Kirill Elagin
largest_number :: [Int] -> String
largest_number as = concat (map show as) -- write your code here
main :: IO ()
main = do
_ <- getLine
as <- fmap (map read . words) getLine
putStrLn $ largest_number as
| xunilrj/sandbox | courses/coursera-sandiego-algorithms/algorithmic-toolbox/assignment002/largest_number/largest_number.hs | apache-2.0 | 232 | 0 | 11 | 52 | 88 | 43 | 45 | 7 | 1 |
{-
This example takes logstash messages from a redis queue and stores them into elasticsearch.
It will print to stdout all errors.
-}
module Main where
import System.Environment (getArgs)
import Control.Monad (when)
import Data.Conduit
import qualified Data.Conduit.List as CL
import Data.Conduit.ElasticSearch
... | bartavelle/hslogstash | examples/RedisToElasticsearch.hs | bsd-3-clause | 1,362 | 0 | 16 | 297 | 354 | 196 | 158 | 28 | 1 |
module Types ( Point, Line, IPoint, ILine ) where
type Point = (Double,Double)
type Line = (Point,Point)
type IPoint = (Int,Point)
type ILine = (IPoint,IPoint)
| mainland/dph | icebox/examples/delaunay/Types.hs | bsd-3-clause | 165 | 0 | 5 | 30 | 66 | 44 | 22 | 5 | 0 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[StgSyn]{Shared term graph (STG) syntax for spineless-tagless code generation}
This data type represents programs just before code generation (conversion to
@Cmm@): basically, what we have is a stylised form of @CoreSyntax@, the style
being one that... | ezyang/ghc | compiler/stgSyn/StgSyn.hs | bsd-3-clause | 28,778 | 0 | 16 | 8,139 | 4,023 | 2,164 | 1,859 | 340 | 4 |
-- |
-- Module : Test.LeanCheck
-- Copyright : (c) 2015-2020 Rudy Matela
-- License : 3-Clause BSD (see the file LICENSE)
-- Maintainer : Rudy Matela <rudy@matela.com.br>
--
-- LeanCheck is a simple enumerative property-based testing library.
--
-- A __property__ is a function returning a 'Bool' that shoul... | rudymatela/llcheck | src/Test/LeanCheck.hs | bsd-3-clause | 3,130 | 0 | 5 | 707 | 300 | 226 | 74 | 68 | 0 |
module Main where
import CV.Image
import CV.Features
import CV.Drawing
import CV.ImageOp
import CV.Bindings.Types
import CV.Transforms
import Utils.GeometryClass
import Utils.Point
import System.Environment
main = do
Just x <- getArgs >>= loadImage . head
let y = rotate (pi/4) x
lst = getMSER (unsafe... | TomMD/CV | examples/mser.hs | bsd-3-clause | 676 | 0 | 13 | 162 | 245 | 126 | 119 | 20 | 1 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module Infer (
Constraint,
TypeError(..),
Subst(..),
inferTop,
constraintsExpr
) where
import Env
import Type
import Syntax
import Control.Monad.Except
import Control.Monad.State
import Cont... | yupferris/write-you-a-haskell | chapter7/poly_constraints/src/Infer.hs | mit | 8,175 | 0 | 15 | 2,054 | 3,140 | 1,615 | 1,525 | 205 | 9 |
{- |
Module : $Header$
Description : generic mixfix analysis, using an Earley parser
Copyright : Christian Maeder and Uni Bremen 2003-2005
License : GPLv2 or higher, see LICENSE.txt
Maintainer : Christian.Maeder@dfki.de
Stability : experimental
Portability : portable
Generic mixfix analysis, usin... | keithodulaigh/Hets | Common/Earley.hs | gpl-2.0 | 16,209 | 11 | 29 | 4,776 | 5,339 | 2,882 | 2,457 | 355 | 10 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.