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 MagicHash, MultiParamTypeClasses, TypeFamilies, DataKinds, FlexibleContexts, OverloadedStrings, TypeOperators #-}
module JavaFX.Methods where
import Java
import JavaFX.Types
foreign import java safe "@static javafx.application.Application.launch"
launch :: JClass a -> JStringArray -> IO ()
foreign im... | filippovitale/eta-playground | javafx-teastorm/src/JavaFX/Methods.hs | mit | 1,452 | 31 | 7 | 225 | 360 | 188 | 172 | -1 | -1 |
-- The series, 1^1 + 2^2 + 3^3 + ... + 10^10 = 10405071317.
-- Find the last ten digits of the series, 1^1 + 2^2 + 3^3 + ... + 1000^1000.
import Data.List
powers :: Integer -> Integer
powers upper = sum $ zipWith (^) [1..upper] [1..upper]
calculate :: String
calculate = reverse $ take 10 $ reverse $ show $ powers 10... | daniel-beard/projecteulerhaskell | Problems/p48.hs | mit | 360 | 0 | 9 | 75 | 98 | 52 | 46 | 7 | 1 |
-- Implicit CAD. Copyright (C) 2011, Christopher Olah (chris@colah.ca)
-- Released under the GNU GPL, see LICENSE
-- We'd like to parse openscad code, with some improvements, for backwards compatability.
module Graphics.Implicit.ExtOpenScad.Default where
import Graphics.Implicit.Definitions
import Graphics.Implicit.... | silky/ImplicitCAD | Graphics/Implicit/ExtOpenScad/Default.hs | gpl-2.0 | 8,272 | 0 | 19 | 3,016 | 3,208 | 1,731 | 1,477 | 175 | 44 |
{- |
Module : $Header$
Description : shell related functions
Copyright : uni-bremen and DFKI
License : GPLv2 or higher, see LICENSE.txt
Maintainer : r.pascanu@jacobs-university.de
Stability : provisional
Portability : portable
CMDL.Shell contains almost all functions related
the CMDL shell or haskeline
-... | nevrenato/Hets_Fork | CMDL/Shell.hs | gpl-2.0 | 15,434 | 0 | 34 | 5,994 | 3,457 | 1,730 | 1,727 | 284 | 46 |
module HEP.Automation.MadGraph.Dataset.Set20110802set1ATLAS where
import HEP.Storage.WebDAV.Type
import HEP.Automation.MadGraph.Model
import HEP.Automation.MadGraph.Machine
import HEP.Automation.MadGraph.UserCut
import HEP.Automation.MadGraph.SetupType
import HEP.Automation.MadGraph.Model.SChanC8Vschmaltz
import HE... | wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110802set1ATLAS.hs | gpl-3.0 | 1,594 | 0 | 10 | 513 | 350 | 222 | 128 | 40 | 1 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
import Data.Maybe
import Network.SimpleIRC
import Web.Twitter.Conduit
import Web.Twitter.Conduit.Response
import Data.Text.Encoding
import Network.HTTP.Conduit (withManager)
import qualified Data.ByteString.Char8 as B
import qualified Data.Text as T
import Web.Au... | DasAsozialeNetzwerk/Samyaza | Main.hs | gpl-3.0 | 2,542 | 0 | 20 | 625 | 787 | 418 | 369 | 65 | 3 |
module Dialogue(
Dialogue (..),
getNewStartDialogue,
getStrPart,
getOptionsPart,
newDialogue,
showOptions,
setOrUnsetLastoption,
showDialogue,
isEnded
)
where
import Space
import UI.NCurses
import Data.List
import Data.Maybe
import Data.ConfigFile
data Dialogue = Dialogue {str :: String,
charpos... | nobrakal/TheBlackCurse | src/Dialogue.hs | gpl-3.0 | 3,265 | 0 | 16 | 673 | 1,206 | 619 | 587 | 68 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-monitoring/gen/Network/Google/Resource/Monitoring/Projects/UptimeCheckConfigs/List.hs | mpl-2.0 | 6,744 | 0 | 18 | 1,484 | 894 | 521 | 373 | 132 | 1 |
module Repl where
import System.Console.Haskeline ( getInputLine
, InputT
, runInputT
, Settings(..)
, Completion
, simpleCompletion
... | eriksvedang/Carp | src/Repl.hs | mpl-2.0 | 3,115 | 0 | 21 | 1,369 | 690 | 379 | 311 | 80 | 5 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | dysinger/amazonka | amazonka-glacier/gen/Network/AWS/Glacier/DeleteArchive.hs | mpl-2.0 | 5,193 | 0 | 9 | 1,075 | 509 | 316 | 193 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Services/Versions/Instances/Delete.hs | mpl-2.0 | 7,908 | 0 | 22 | 1,693 | 959 | 566 | 393 | 139 | 1 |
{-# OPTIONS_GHC -Wall #-}
-- !! WARNING: SPOILERS AHEAD !! --
-- CIS 194: Homework 8
module Party where
import Provided.Employee
import Control.Applicative ( (<$>) )
import Data.Biapplicative ( biliftA2 )
import Data.Ord ( comparing )
import Data.List ( sort )
import Data.Monoid
import Da... | nilthehuman/cis194 | Homework8.hs | unlicense | 2,423 | 0 | 11 | 611 | 658 | 356 | 302 | 41 | 1 |
-- | A knowledge base is a set of formulas. See MarkovLogic.hs for probabilistic
-- knowledge bases.
module Akarui.FOL.FormulaSet where
import qualified Data.Set as Set
import Data.Set (Set)
import Data.Map (Map)
import Akarui.FOL.Formula
import Akarui.FOL.FOL
import Akarui.FOL.Predicate
import Akarui.FOL.Term
import ... | PhDP/Manticore | Akarui/FOL/FormulaSet.hs | apache-2.0 | 2,184 | 0 | 12 | 409 | 581 | 307 | 274 | 33 | 2 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
-- |
--
-- OAuth2 plugin for http://www.google.com
--
-- * Authenticates against Google
-- * Uses Google user id or email as credentials identifier
-- * Returns given_name, family_name, email, and avatar_url as extras
--
-- Note: This may eventually replace Yesod.... | jasonzoladz/yesod-auth-oauth2 | Yesod/Auth/OAuth2/Google.hs | bsd-2-clause | 4,744 | 0 | 19 | 1,195 | 870 | 497 | 373 | 88 | 2 |
-- http://www.codewars.com/kata/53d3173cf4eb7605c10001a8
module Power where
power :: [a] -> [[a]]
power = ([]:) . power' where
power' [] = []
power' (x:xs) = [x] : foldr f [] (power' xs) where
f ys r = ys : (x : ys) : r | Bodigrim/katas | src/haskell/5-By-the-Power-Set-of-Castle-Grayskull.hs | bsd-2-clause | 234 | 0 | 12 | 56 | 116 | 64 | 52 | 6 | 2 |
-- | Example usage in a program that wants to access its own git version:
--
-- > {-# LANGUAGE TemplateHaskell #-}
-- > import Distribution.VcsRevision.Git
-- > import Language.Haskell.TH.Syntax
-- >
-- > showMyGitVersion :: String
-- > showMyGitVersion = $(do
-- > v <- qRunIO getRevision
-- > lift $ case v of
-- ... | jkff/vcs-revision | Distribution/VcsRevision.hs | bsd-2-clause | 508 | 0 | 3 | 114 | 23 | 20 | 3 | 1 | 0 |
module Utils.Drasil.Contents (enumBullet, enumBulletU, enumSimple,
enumSimpleU, eqUnR, eqUnR', mkEnumSimpleD) where
import Language.Drasil
import Utils.Drasil.Misc (bulletFlat, mkEnumAbbrevList)
import Control.Lens ((^.))
eqUnR :: Expr -> Reference -> LabelledContent
eqUnR e lbl = llcc lbl $ EqnBlock e
eqUnR' :: ... | JacquesCarette/literate-scientific-software | code/drasil-utils/Utils/Drasil/Contents.hs | bsd-2-clause | 2,371 | 0 | 10 | 400 | 584 | 318 | 266 | 25 | 1 |
{-# LANGUAGE TemplateHaskell, GeneralizedNewtypeDeriving, DeriveDataTypeable,
TypeFamilies
#-}
module Happstack.Auth.Internal.Data.AuthState where
import Data.Typeable
import Data.SafeCopy
import Happstack.Auth.Internal.Data.SessionData
import Happstack.Auth.Internal.Data.Sessions
import Ha... | mcmaniac/happstack-auth | src/Happstack/Auth/Internal/Data/AuthState.hs | bsd-3-clause | 661 | 0 | 9 | 126 | 107 | 69 | 38 | 15 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
module Numeric.Algorithms.HSVO.Types where
import Control.Lens
import Generics.Deriving
{-
-}
(*^) :: Num a => [a] -> [a] -> [a]
(*^) = zipWith (*)
(-^) :: Num a => [a] -> [a] -> [a]
(-^) = zipWith (-)
type Value = Double
type BaseVector = [Value]... | johnny555/HSVO | src/Numeric/Algorithms/HSVO/Types.hs | bsd-3-clause | 3,774 | 0 | 9 | 1,064 | 829 | 471 | 358 | -1 | -1 |
#!/usr/bin/env runhaskell
-- setup configure -fodbc -foracle -fpostgres -fsqlite
import Distribution.PackageDescription
( PackageDescription(..), Library(..), BuildInfo(..), HookedBuildInfo
, emptyHookedBuildInfo, emptyBuildInfo
)
import Distribution.PackageDescription.Parse ( writeHookedBuildInfo )
... | necrobious/takusen | Setup.hs | bsd-3-clause | 7,430 | 8 | 19 | 1,369 | 1,485 | 779 | 706 | -1 | -1 |
module SLISP.Core (
loadLibs,
evalFile
) where
import SLISP.Data
import SLISP.Eval
import SLISP.Parser
libs :: [String]
libs = ["src/lib/core.lisp"]
evalFile :: State -> String -> IO (State)
evalFile (t, _) f = readFile f >>= \x -> return $ last $ listEval (t, parseLisp x)
loadLibs :: [String] -> State -> IO... | ameingast/slisp | src/SLISP/Core.hs | bsd-3-clause | 474 | 0 | 10 | 99 | 202 | 108 | 94 | 14 | 2 |
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE NoImplicitPrelude, MagicHash #-}
{-# LANGUAGE StandaloneDeriving #-}
-----------------------------------------------------------------------------
-- |
-- Module : Control.Exception.Base
-- Copyright : (c) The University of Glasgow 2001
-- License : BSD-style (se... | gridaphobe/ghc | libraries/base/Control/Exception/Base.hs | bsd-3-clause | 14,803 | 0 | 15 | 3,529 | 2,042 | 1,159 | 883 | 175 | 3 |
{-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.Functions.F03
-- Copyright : (c) Sven Panne 2019
-- License : BSD3
--
-- Maintainer : Sven Panne <svenpanne@gmail.com>
-- Stability : stable
-- Portability : por... | haskell-opengl/OpenGLRaw | src/Graphics/GL/Functions/F03.hs | bsd-3-clause | 64,510 | 0 | 21 | 9,423 | 11,106 | 5,760 | 5,346 | 1,139 | 1 |
module Network.XMPP.Presence.Myself
( MyPresenceRef
, myPresenceGet
, myPresenceSetHandler
, myPresenceSend
, myPresencePlugin
) where
import Control.Monad
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import UnliftIO.IORef
import Control.Handler (Handler)
import qualified Control.Han... | abbradar/yaxmpp | src/Network/XMPP/Presence/Myself.hs | bsd-3-clause | 2,234 | 0 | 14 | 488 | 587 | 302 | 285 | -1 | -1 |
module Usecases where
import Data.ByteString.Lazy
import Data.ByteString.Lazy.Char8
import Repositories.LocalRepository
import Types.Event
storeEvent :: Repository IO Event -> Event -> IO ()
storeEvent repository event = repository `save` event
fetchLastEvent :: Repository IO ... | hsienchiaolee/stethoscope | src/Usecases.hs | bsd-3-clause | 361 | 0 | 8 | 82 | 88 | 49 | 39 | 9 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE ViewPatterns #-}
module Data.Aeson.Lens (
-- * Lenses
nth, nth',
key, key',
asDouble,
asText,
asBool,
-- * Traversals
traverseArray, traverseAr... | tanakh/aeson-lens | Data/Aeson/Lens.hs | bsd-3-clause | 7,775 | 0 | 14 | 1,771 | 1,887 | 1,027 | 860 | 114 | 9 |
module Canonicalize (module') where
import Control.Applicative ((<$>),(<*>))
import qualified Data.List as List
import qualified Data.Map as Map
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import qualified Data.Traversable as T
import AST.Expression.General (Expr'(..), dummyLet)
import AST.M... | JoeyEremondi/elm-type-effect | src/Canonicalize.hs | bsd-3-clause | 13,541 | 22 | 22 | 4,425 | 4,166 | 2,145 | 2,021 | 338 | 21 |
-----------------------------------------------------------------------------
-- |
-- Module : Numeric.Signal.EEG
-- Copyright : (c) Alexander Vivian Hugh McPhail 2010, 2014
-- License : BSD3
--
-- Maintainer : haskell.vivian.mcphail <at> gmail <dot> com
-- Stability : provisional
-- Portabil... | amcphail/hsignal | lib/Numeric/Signal/EEG.hs | bsd-3-clause | 571 | 0 | 4 | 148 | 32 | 26 | 6 | 3 | 0 |
{-# LANGUAGE
BangPatterns,
ScopedTypeVariables,
NoImplicitPrelude
#-}
{- |
Parsers for parsing dates and times.
-}
module Json.Internal.JsonParser.Time
(
run
, day
, localTime
, timeOfDay
, timeZone
, utcTime
, zonedTime
) where
import BasePrelude
import Data.Attoparsec.Text a... | aelve/json-x | lib/Json/Internal/JsonParser/Time.hs | bsd-3-clause | 4,385 | 1 | 21 | 1,194 | 1,256 | 628 | 628 | -1 | -1 |
module Db where
import JSON
import Proplists
import Data.List
type DB = [ Proplist ]
type Record = Proplist
data Mp3 = Mp3 { song :: String, artist :: String, rating :: Integer } deriving (Show)
mp31 = Mp3 { song = "Street Spirit", artist = "Radiohead", rating = 9}
mp32 = Mp3 { song = "We Will Rock You", artist =... | tty/joy-of-coding | src/Db.hs | bsd-3-clause | 1,316 | 0 | 11 | 325 | 515 | 278 | 237 | 35 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- | This module provides functions related to query serialization.
module Database.Influx.Internal.Helpers
( urlAppend
, credsToQueryString
, epochToBytestring
, queryParamsToQueryString
, serializeInfluxData
, writeParamsToQueryString
)
where
import Dat... | factisresearch/influx | src/Database/Influx/Internal/Helpers.hs | bsd-3-clause | 3,348 | 0 | 13 | 702 | 919 | 486 | 433 | 66 | 6 |
{-# LANGUAGE
NoImplicitPrelude,
GADTs,
PolyKinds,
TypeFamilies,
TypeOperators,
ScopedTypeVariables
#-}
{-|
Module : Alt.Abstract.Category
Description : Class of Categories
Copyright : (c) Nicolas Godbout, 2015
License : BSD-3
Maintainer ... | DrNico/alt-base | Alt/Abstract/Category.hs | bsd-3-clause | 3,710 | 0 | 10 | 1,033 | 725 | 414 | 311 | 68 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
module Rehi.Utils.Regex where
import Control.Monad.Fix(fix)
import Data.ByteString(ByteString)
import Data.String(IsString,fromString)
import System.IO.Unsafe (unsafePerformIO)
import Text.Regex.PCRE.ByteString (... | max630/git-rehi | app/Rehi/Utils/Regex.hs | gpl-2.0 | 2,080 | 0 | 20 | 536 | 689 | 364 | 325 | 48 | 3 |
{- | Difference lists: a data structure for /O(1)/ append on lists, also adapted
for /O(1)/ test if it is empty.
-}
module Data.DList
( DList
-- * Construction
, empty
, singleton
, cons
, snoc
, append
-- * Query
, null
-- * Conversion
-- ** Lists
, fromList
, toList
, apply
) wh... | rodrigo-machado/verigraph | src/library/Data/DList.hs | gpl-3.0 | 2,143 | 0 | 10 | 555 | 593 | 317 | 276 | 41 | 1 |
module EnumTypes where
import CLaSH.Prelude
data Valid = Valid | Invalid
data Exec = Exec | NOP
topEntity :: Vec 2 Valid -> Vec 2 Exec
topEntity xs = map convert xs where
convert Valid = Exec
convert Invalid = NOP
| ggreif/clash-compiler | tests/shouldwork/Vector/EnumTypes.hs | bsd-2-clause | 225 | 0 | 7 | 52 | 79 | 42 | 37 | -1 | -1 |
{-
(c) The University of Glasgow, 2004-2006
Module
~~~~~~~~~~
Simply the name of a module, represented as a FastString.
These are Uniquable, hence we can build Maps with Modules as
the keys.
-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE DeriveDataTypeable #-}
module ETA.Basi... | pparkkin/eta | compiler/ETA/BasicTypes/Module.hs | bsd-3-clause | 47,917 | 0 | 18 | 10,623 | 7,995 | 4,338 | 3,657 | 660 | 3 |
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE QuasiQuotes #-}
-- | Definitions found in Haskell's "Data.List".
--
-- This module should be imported qualified to avoid clashes with standard
-- Haskell definitions.
module Stg.Prelude.List (
nil,
concat2,
reverse,
foldl,
foldl',
foldr,
ite... | quchen/stg | src/Stg/Prelude/List.hs | bsd-3-clause | 14,877 | 0 | 8 | 6,031 | 571 | 466 | 105 | 54 | 1 |
-- a prefix minus precedence test
f :: Int -> Int -> Int -> Int
f x y z = - x * y ^ z
main = putStr (shows (f 5 2 3) "\n")
| urbanslug/ghc | testsuite/tests/numeric/should_run/arith009.hs | bsd-3-clause | 125 | 0 | 9 | 37 | 67 | 34 | 33 | 3 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Haskmon.Types.Internals where
import Data.Aeson
import Data.Aeson.Types
import Data.Time.Format
import Data.Time.Clock
import Control.Monad(mzero)
import Haskmon.Resource(getResource)
-- {{{ MetaData
-- | Metadata that all resources (except Pokedex) have in common
data Meta... | pjrt/Haskmon | src/Haskmon/Types/Internals.hs | mit | 13,452 | 4 | 42 | 6,187 | 2,723 | 1,457 | 1,266 | 271 | 1 |
module Gshell (
module Gshell.Names
, module Gshell.State
, module Gshell.Unionfs
, module Gshell.Run
)
| ctlab/gShell | src/Gshell.hs | mit | 122 | 0 | 5 | 33 | 30 | 20 | 10 | -1 | -1 |
--------------------------------------------------------------------------------
-- Maximum path sum I
-- Problem 18
-- By starting at the top of the triangle below and moving to adjacent numbers on
-- the row below, the maximum total from top to bottom is 23.
-- 3
-- 7 4
-- 2 4 6
-- 8 5 9 3
-- That is, 3 + 7 ... | bertdouglas/euler-haskell | 001-050/18a.hs | mit | 2,727 | 0 | 13 | 1,158 | 399 | 227 | 172 | 31 | 1 |
import System.Environment
import System.Random
import Control.Monad
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BC
intToChar :: Int -> Char
intToChar int = toEnum safeInt
where safeInt = int `mod` 255
intToBC :: Int -> BC.ByteString
intToBC int = BC.pack [intToChar int]
replaceB... | raventid/coursera_learning | haskell/will_kurt/25_glitcher.hs | mit | 1,841 | 0 | 11 | 393 | 600 | 306 | 294 | 47 | 1 |
module GitHub.Repositories.Comments where
import GitHub.Internal
shaComment s = ["/commits/", s, "/comments"]
commentId i = ["/comments", i]
--| GET /repos/:owner/:repo/comments
listRepositoryComments ::
OwnerName ->
RepoName ->
GitHub CommentsData
listRepositoryComments o r = get [] (ownedRepo o r <> "/comments")... | SaneApp/github-api | src/GitHub/Repositories/Comments.hs | mit | 1,305 | 50 | 12 | 204 | 596 | 294 | 302 | -1 | -1 |
{-# LANGUAGE CPP #-}
module GHCJS.DOM.CSSCharsetRule (
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
module GHCJS.DOM.JSFFI.Generated.CSSCharsetRule
#else
#endif
) where
#if (defined(ghcjs_HOST_OS) && defined(USE_JAVASCRIPTFFI)) || !defined(USE_WEBKIT)
import GHCJS.DOM.JSFFI.Gen... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/CSSCharsetRule.hs | mit | 355 | 0 | 5 | 33 | 33 | 26 | 7 | 4 | 0 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.ErrorEvent
(js_getMessage, getMessage, js_getFilename, getFilename,
js_getLineno, getLineno, js_getColno, getColno, ErrorEvent,
castToErrorEvent, gTypeErrorEvent)
where
import Prelude... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/ErrorEvent.hs | mit | 2,491 | 24 | 11 | 337 | 609 | 359 | 250 | 39 | 1 |
{-# LANGUAGE TypeOperators, ExistentialQuantification #-}
module Core.ECS
( Entity, entity
, Component, stock, component
, HasEntity
, empty
, state
, insert
, modify
, singleton
, lens
) where
import Prelude hiding ((.), id)
import Core.Types ((:->))
import Control.Category
i... | jameshsmith/HRL | Server/Core/ECS.hs | mit | 1,794 | 0 | 11 | 398 | 718 | 376 | 342 | 53 | 2 |
module Bot.Component.Conditional (
conditional
, conditionalT
, constConditional
, constConditionalT
) where
import Bot.Component
import Bot.IO
import Control.Monad
import Control.Monad.Trans
import Control.Monad.Trans.Identity
-- | Similar to conditionalT but less generic and easier to use.
conditional ... | numberten/zhenya_bot | Bot/Component/Conditional.hs | mit | 1,881 | 0 | 11 | 510 | 357 | 191 | 166 | 30 | 1 |
module Authentication where
import Crypto.PasswordStore
import Data.ByteString
| parsonsmatt/QuickLift | src/Authentication.hs | mit | 80 | 0 | 4 | 8 | 14 | 9 | 5 | 3 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TupleSections #-}
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-kinesisfirehose-deliverystream-s3destinationconfiguration.html
module Stratosphere.ResourceProperties.Kinesis... | frontrowed/stratosphere | library-gen/Stratosphere/ResourceProperties/KinesisFirehoseDeliveryStreamS3DestinationConfiguration.hs | mit | 7,867 | 0 | 13 | 478 | 709 | 406 | 303 | 60 | 1 |
module Lookup
(
boxType,
labelType,
alignmentType,
sliderType,
whenType,
inputType,
outputType,
packType,
buttonType,
browserType,
menuItemType,
menuButtonType,
dialType,
valuatorType,
scrollbarType,
counterType,
scrollType,
windowType,
fontType,
spinnerType,
flClasses,
imag... | deech/fltkhs | src/Fluid/Lookup.hs | mit | 9,582 | 0 | 7 | 1,692 | 2,542 | 1,680 | 862 | 273 | 1 |
class BasicEq a where
isEqual :: a -> a -> Bool
instance BasicEq Bool where
isEqual True True = True
isEqual False False = False
isEqual _ _ = False
instance BasicEq Int where
isEqual _ _ = False
class BasicEq2 a where
isEqual2 :: a -> a -> Bool
isNotEqual2 :: a -> a -> Bool
class... | tamasgal/haskell_exercises | Real_World_Haskell/ch06/eqclasses.hs | mit | 612 | 0 | 9 | 188 | 261 | 140 | 121 | 21 | 0 |
{-
Copyright (C) 2006-7 John MacFarlane <jgm@berkeley.edu>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is dis... | kowey/pandoc-old | src/Text/Pandoc.hs | gpl-2.0 | 4,159 | 0 | 5 | 1,153 | 307 | 213 | 94 | 57 | 1 |
module Ch_03 (Matrix, gauss, transpose, symmetric, mapMatrix) where
-- Found this. Looks like good boilerplate!
type Number = Double
type Vector = [Number]
type Row = [Number]
type Matrix = [Row]
mapMatrix :: Matrix -> Vector -> Vector
mapMatrix rows v = [sum (zipWith (*) row v) | row <- rows]
gauss :: Matrix -> Vec... | Marcus-Rosti/numerical-methods | src/ch_03/Ch_03.hs | gpl-2.0 | 1,576 | 0 | 12 | 435 | 681 | 360 | 321 | 42 | 3 |
{-|
Module : Colors
Description : Color operations used throughout Contextual and its backends
Copyright : (c) Chris Hodapp, 2016
License : ?
Maintainer : Hodapp87@gmail.com
Stability : experimental
Portability : POSIX
-}
module Graphics.Rendering.Contextual.Colors where
import Text.Printf (printf, Pr... | Hodapp87/contextual | src/Graphics/Rendering/Contextual/Colors.hs | gpl-3.0 | 3,397 | 0 | 10 | 892 | 719 | 434 | 285 | 38 | 1 |
module Rebass.Reaper.ReaperProjectStatus(ReaperProjectStatus, projectStatus) where
import Rebass.Path
import System.Directory
import Rebass.ListUtil(replace)
import Rebass.Reaper.Samples(samples, sampleFilePath)
import Rebass.Reaper.ReaperProject(Project, Node(Command, Container), Parameter(..))
import Rebass.Reape... | codeflows/rebass | src/Rebass/Reaper/ReaperProjectStatus.hs | gpl-3.0 | 951 | 0 | 12 | 99 | 230 | 136 | 94 | 16 | 1 |
module Main where
produtoEscalar :: [Int]->[Int] -> Int
produtoEscalar x y = sum (zipWith (*) x y)
main :: IO()
main = do
print (produtoEscalar [1..3] [1..3])
| llscm0202/BIGDATA2017 | ATIVIDADE1/exerciciosListas/ex5.hs | gpl-3.0 | 164 | 0 | 10 | 32 | 87 | 47 | 40 | 6 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-cloudtasks/gen/Network/Google/Resource/CloudTasks/Projects/Locations/Queues/SetIAMPolicy.hs | mpl-2.0 | 6,551 | 0 | 16 | 1,345 | 789 | 465 | 324 | 121 | 1 |
--
-- Copyright 2017-2018 Azad Bolour
-- Licensed under GNU Affero General Public License v3.0 -
-- https://github.com/azadbolour/boardgame/blob/master/LICENSE.md
--
module Main where
import Control.Monad
import Data.Map as Map
import qualified BoardGame.Common.Domain.Piece as Piece
accumulate :: Map Char Int -> ... | azadbolour/boardgame | haskell-server/app/DistributionTrial.hs | agpl-3.0 | 755 | 0 | 12 | 153 | 238 | 122 | 116 | 19 | 2 |
module Main where
import Data.GI.CodeGen.JNI
import qualified Data.Map as M (empty, fromList, mapKeys, toList, union)
import Data.Foldable (traverse_)
import qualified Data.Text as T (Text, lines, pack, unpack, toLower)
import qualified Data.Text.IO as TIO (readFile)
import Data.Tuple (swap)
import Options.Applicativ... | ford-prefect/gir2jni | app/Main.hs | lgpl-2.1 | 3,330 | 0 | 17 | 1,085 | 918 | 479 | 439 | 74 | 3 |
triangle = [1] : [1,1] : map f [1..]
where f n = let row = triangle !! n
newRow= foldr ((:) . (\(x,y) -> x + y)) [1] $ zip row $ tail row
in 1 : newRow
showRow :: [Int] -> [Char]
showRow = unwords . map show
main = do
rows <- readLn
putStr $ unlines $... | itsbruce/hackerrank | func/recur/pascal.hs | unlicense | 354 | 0 | 18 | 135 | 176 | 92 | 84 | 9 | 1 |
module Algo.DP.DivideConquer (
) where
import qualified Data.Grid as G
maxAreaOfOne :: G.Grid Char -> Int
maxAreaOfOne map = G.map map (G.replicate (
go (0,0) map (G.replicate (G.shape grid) 0)
| seckcoder/lang-learn | haskell/algo/src/Algo/DP/DivideConquer.hs | unlicense | 219 | 1 | 9 | 55 | 82 | 47 | 35 | -1 | -1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
module Pos.Util.UnitsOfMeasure
( UnitOfMeasure (..)
, MeasuredIn(..)
) where
import Control.Lens (at, (?~))
import Data.Aeson (FromJSON (..), ToJSON (..), Value (..), object,
withObject, (.:), (.=))
im... | input-output-hk/cardano-sl | lib/src/Pos/Util/UnitsOfMeasure.hs | apache-2.0 | 4,399 | 0 | 19 | 1,341 | 1,139 | 624 | 515 | -1 | -1 |
module HelperSequences.A006519 (a006519) where
import HelperSequences.A001511 (a001511)
a006519 n = 2^(a001511 n - 1)
| peterokagey/haskellOEIS | src/HelperSequences/A006519.hs | apache-2.0 | 119 | 0 | 8 | 15 | 43 | 24 | 19 | 3 | 1 |
module AlecSequences.A273190 (a273190) where
a273190 :: Integer -> Int
a273190 n = length $ takeWhile (< 2 * n) $ dropWhile (< n) $ map (^2) [1..]
| peterokagey/haskellOEIS | src/AlecSequences/A273190.hs | apache-2.0 | 148 | 0 | 10 | 28 | 70 | 39 | 31 | 3 | 1 |
-----------------------------------------------------------------------------
--
-- Module : Encoder
-- Description :
-- Copyright : (c) Tobias Reinhardt, 2015 <tobioso92_@hotmail.com
-- License : Apache License, Version 2.0
--
-- Maintainer : Tobias Reinhardt <tobioso92_@hotmail.com>
-- Portability : ... | tobiasreinhardt/show | IniConfiguration/src/Encoder.hs | apache-2.0 | 1,645 | 0 | 10 | 356 | 445 | 239 | 206 | 27 | 4 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module StaticFiles where
import Yesod.Helpers.Static
-- | This generates easy references to files in the static directory at compile time.
-- The upside to this is that you have compile-time verification that referenced files
-- exist. However, any fi... | snoyberg/orangeroster | StaticFiles.hs | bsd-2-clause | 486 | 0 | 7 | 83 | 26 | 17 | 9 | 5 | 0 |
--
-- Module : Data.Enumerator.Util.Print
-- Copyright : (c) 2011 Ian-Woo Kim
--
-- License : BSD3
-- Maintainer : ianwookim@gmail.com
-- Stability : experimental
-- Portability : GHC
--
-- Print support in Iteratee
--
module Data.Enumerator.Util.Print where
import Control.Monad
import Control.Monad.IO... | wavewave/enumerator-util | src/Data/Enumerator/Util/Print.hs | bsd-2-clause | 1,071 | 0 | 17 | 263 | 337 | 176 | 161 | 26 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.Bifoldable
-- Copyright : (C) 2011 Edward Kmett,
-- License : BSD-style (see the file LICENSE)
--
-- Maintainer : Edward Kmett <ekmett@gmail.com>
-- Stability : provisional
-- Portability : portable
-... | phaazon/bifunctors | src/Data/Bifoldable.hs | bsd-2-clause | 4,396 | 0 | 14 | 1,102 | 2,080 | 1,091 | 989 | 108 | 1 |
{-# LANGUAGE OverloadedStrings, QuasiQuotes, ViewPatterns #-}
module Transformations.Optimising.SimpleDeadParameterEliminationSpec where
import Transformations.Optimising.SimpleDeadParameterElimination
import Test.Hspec
import Grin.TH
import Test.Test hiding (newVar)
import Test.Assertions
runTests :: IO ()
runTest... | andorp/grin | grin/test/Transformations/Optimising/SimpleDeadParameterEliminationSpec.hs | bsd-3-clause | 2,478 | 0 | 12 | 1,080 | 260 | 145 | 115 | 27 | 1 |
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import RevealHs
import RevealHs.Sample.Cover
import RevealHs.Sample.Section1
import RevealHs.Sample.Section2
mkRevealPage def { revealJsRoot = "/home/kj/Lab/external/reveal.js"
... | KenetJervet/reveal-hs | app/Main.hs | bsd-3-clause | 444 | 0 | 8 | 154 | 62 | 39 | 23 | 11 | 0 |
{-# LANGUAGE CPP, ScopedTypeVariables, MagicHash, UnboxedTuples #-}
#if __GLASGOW_HASKELL__ > 710
{-# OPTIONS_GHC -ffull-guard-reasoning #-}
#endif
-----------------------------------------------------------------------------
--
-- GHC Interactive support for inspecting arbitrary closures at runtime
--
-- Pepe Iborra ... | gridaphobe/ghc | compiler/ghci/RtClosureInspect.hs | bsd-3-clause | 52,583 | 13 | 27 | 16,009 | 12,189 | 6,186 | 6,003 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Web.Beam.Utils.Cookie
( setCookie
, setCookie'
, getCookie
, getCookies
, removeCookie
) where
import Data.Maybe (fromMaybe)
import Data.Text.Lazy (Text)
import Data.Time.Calendar
import Data.Time.Clock
import qualified Data.Text.Lazy as T
import qualified Data.Te... | hansonkd/BeamFramework | Web/Beam/Utils/Cookie.hs | bsd-3-clause | 1,776 | 0 | 12 | 321 | 511 | 283 | 228 | 42 | 1 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module Language.Haskell.GhcMod.CabalApi (
getCompilerOptions
, parseCabalFile
, cabalAllBuildInfo
, cabalDependPackages
, cabalSourceDirs
, cabalAllTargets
) where
import Language.Haskell.GhcMod.Types
import Language.Haskell.GhcMod.GhcPkg
import Control.Applica... | carlohamalainen/ghc-mod | Language/Haskell/GhcMod/CabalApi.hs | bsd-3-clause | 8,427 | 0 | 20 | 1,594 | 2,146 | 1,145 | 1,001 | 146 | 5 |
module Rules.Clean (clean, cleanSourceTree, cleanRules) where
import Base
clean :: Action ()
clean = do
putBuild "| Removing Hadrian files..."
cleanSourceTree
path <- buildRoot
removeDirectory path
putSuccess "| Done. "
cleanSourceTree :: Action ()
cleanSourceTree = do
path <- buildRoot
f... | bgamari/shaking-up-ghc | src/Rules/Clean.hs | bsd-3-clause | 846 | 0 | 11 | 227 | 202 | 103 | 99 | 25 | 1 |
import Data.Maybe (listToMaybe, fromJust)
import Data.Char (isDigit, isSpace, digitToInt)
type Parse a = String -> [(a, String)]
succeed :: a -> Parse a
succeed v inp = [(v, inp)]
check :: (Char -> Bool) -> Parse Char
check p (c : cs) | p c = [(c, cs)]
check _ _ = []
char :: Char -> Parse Char
char = check . (==)
... | YoshikuniJujo/funpaala | samples/20_parser/parser.hs | bsd-3-clause | 1,852 | 12 | 10 | 434 | 1,106 | 585 | 521 | 53 | 1 |
-- |
--
-- These definitions are based on those found in @rules/utils.sml@.
module Rules.Utils where
import Derivation
import Goal
import Tactic
import Term
-- | Tactics which operate on our 'Term's and 'Derivation's.
type PrlTactic = Tactic Derivation Goal
type Target = Int
type Universe = Int
-- | Add a 'Term' ... | thsutton/cha | lib/Rules/Utils.hs | bsd-3-clause | 1,104 | 0 | 8 | 375 | 292 | 152 | 140 | 33 | 20 |
{-# OPTIONS -fglasgow-exts #-}
{-# OPTIONS -w #-}
module System.Plugins.ParsePkgConfCabal (
parsePkgConf, parseOnePkgConf
) where
import Distribution.InstalledPackageInfo
import Distribution.Package hiding (depends)
import Distribution.Version
import Data.Char ( isSpace, isAlpha, isAlphaNum, i... | abuiles/turbinado-blog | tmp/dependencies/hs-plugins-1.3.1/src/System/Plugins/ParsePkgConfCabal.hs | bsd-3-clause | 25,690 | 493 | 23 | 4,460 | 6,614 | 3,624 | 2,990 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Favicon where
import Graphics.Blank -- import the blank canvas
import Wiki -- (32,32)
main :: IO ()
main = blankCanvas 3000 $ \ context -> do -- start blank canvas on port 3000
send context $ do -- send commands to this specific con... | ku-fpg/blank-canvas | wiki-suite/Favicon.hs | bsd-3-clause | 1,543 | 1 | 26 | 665 | 602 | 317 | 285 | 28 | 1 |
-- | The competition strategy. Wrapper for default runtime/derivational complexity.
--
-- termcomp 2017:
-- * rc/rci
-- * add amortized analysis
-- termcomp 2018:
-- * certification:
-- * compute more precise bounds of MIs
-- * add automaton based maximal matrix MI
module Tct.Trs.Strategy.Competition
( co... | ComputationWithBoundedResources/tct-trs | src/Tct/Trs/Strategy/Competition.hs | bsd-3-clause | 2,281 | 0 | 16 | 786 | 310 | 185 | 125 | -1 | -1 |
{-# language CPP #-}
-- | = Name
--
-- VK_KHR_shader_terminate_invocation - device extension
--
-- == VK_KHR_shader_terminate_invocation
--
-- [__Name String__]
-- @VK_KHR_shader_terminate_invocation@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
-- 216
--
-- [__Revi... | expipiplus1/vulkan | src/Vulkan/Extensions/VK_KHR_shader_terminate_invocation.hs | bsd-3-clause | 6,031 | 0 | 8 | 1,061 | 280 | 216 | 64 | -1 | -1 |
{-# LANGUAGE EmptyDataDecls, TypeSynonymInstances #-}
{-# OPTIONS_GHC -fcontext-stack60 #-}
module Games.Chaos2010.Database.Triggers where
import Games.Chaos2010.Database.Fields
import Database.HaskellDB.DBLayout
type Triggers =
Record
(HCons (LVPair Relvar_name (Expr (Maybe String)))
(HCons (L... | JakeWheat/Chaos-2010 | Games/Chaos2010/Database/Triggers.hs | bsd-3-clause | 2,961 | 0 | 51 | 1,661 | 608 | 310 | 298 | 42 | 1 |
module Y2015.Day03 (answer1, answer2) where
import Control.Monad (fmap)
import Data.List (scanl, nub)
type Pos = (Int, Int)
answer1 :: IO ()
answer1 = do
directions <- getData
let coords = scanl move (0, 0) directions
print $ length . nub $ coords
answer2 :: IO ()
answer2 = do
directions <- getData... | geekingfrog/advent-of-code | src/Y2015/Day03.hs | bsd-3-clause | 1,013 | 0 | 11 | 269 | 488 | 256 | 232 | 31 | 3 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
TcPat: Typechecking patterns
-}
{-# LANGUAGE CPP, RankNTypes, TupleSections #-}
module TcPat ( tcLetPat
, TcPragEnv, lookupPragEnv, emptyPragEnv
, LetBndrSpec(..), addInlinePrags
, ... | tjakway/ghcjvm | compiler/typecheck/TcPat.hs | bsd-3-clause | 49,373 | 1 | 20 | 15,860 | 8,230 | 4,297 | 3,933 | 569 | 4 |
module Main where
import Dashdo.Examples.IrisKMeans
main = irisKMeans
| diffusionkinetics/open | dashdo-examples/exe/IrisKMeans.hs | mit | 72 | 0 | 4 | 10 | 15 | 10 | 5 | 3 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/GetHostnameSuggestion.hs | mpl-2.0 | 4,337 | 0 | 11 | 868 | 533 | 322 | 211 | 62 | 1 |
{-# LANGUAGE RankNTypes, RecordWildCards, GeneralizedNewtypeDeriving, BangPatterns, FlexibleContexts #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Distribution.Server.Framework.BackupRestore (
BackupEntry(..),
restoreServerBackup,
importBlank,
importCSV,
parseText,
parseRead,
parseUTCTi... | snoyberg/hackage-server | Distribution/Server/Framework/BackupRestore.hs | bsd-3-clause | 17,445 | 0 | 22 | 4,195 | 4,255 | 2,180 | 2,075 | 298 | 7 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell, OverloadedStrings #-}
module Stack.NixSpec where
import Control.Exception
import Control.Monad.Logger
import Data.Maybe
import Data.Monoid
import Options.Applicative
import Path
import Prelude -- to remove the warning abo... | AndreasPK/stack | src/test/Stack/NixSpec.hs | bsd-3-clause | 4,348 | 0 | 20 | 1,002 | 1,019 | 500 | 519 | 101 | 1 |
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
************************************************************************
* *
\section[FloatIn]{Floating Inwards pass}
* ... | pparkkin/eta | compiler/ETA/SimplCore/FloatIn.hs | bsd-3-clause | 23,134 | 0 | 17 | 6,131 | 2,987 | 1,622 | 1,365 | 189 | 4 |
#!/usr/bin/env runhaskell
{-# LANGUAGE NoImplicitPrelude, OverloadedStrings #-}
{-# OPTIONS -Wall #-}
import Data.Tensor.TypeLevel
import qualified Data.Text.IO as T
import Language.Paraiso.Annotation (Annotation)
import Language.Paraiso.Generator (generateIO)
import qualified Language.Pa... | drmaruyama/Paraiso | examples/HelloGPU/Generator.hs | bsd-3-clause | 2,077 | 0 | 11 | 434 | 551 | 309 | 242 | 48 | 1 |
module Distribution.Client.Dependency.Modular.IndexConversion where
import Data.List as L
import Data.Map as M
import Data.Maybe
import Prelude hiding (pi)
import qualified Distribution.Client.PackageIndex as CI
import Distribution.Client.Types
import Distribution.Compiler
import Distribution.InstalledPackageInfo as ... | jwiegley/ghc-release | libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/IndexConversion.hs | gpl-3.0 | 8,178 | 0 | 20 | 1,903 | 2,270 | 1,191 | 1,079 | 115 | 9 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE BangPatterns #-}
import qualified Data.ByteString as BS
import qualified Data.Foldable as F
import qualified Data.HashMap.Lazy as HM
import qualified Data.Map as M
import qualified Data.Sequence as S
import qualif... | ddssff/lens | benchmarks/folds.hs | bsd-3-clause | 3,017 | 0 | 17 | 937 | 1,091 | 560 | 531 | 81 | 1 |
module KAT_Twofish (tests) where
import Imports
import BlockCipher
import qualified Data.ByteString as B
import Crypto.Cipher.Twofish
vectors_twofish128 =
[ KAT_ECB (B.replicate 16 0x00) (B.replicate 16 0x00) (B.pack [0x9F,0x58,0x9F,0x5C,0xF6,0x12,0x2C,0x32,0xB6,0xBF,0xEC,0x2F,0x2A,0xE8,0xC3,0x5A])
, KAT_EC... | vincenthz/cryptonite | tests/KAT_Twofish.hs | bsd-3-clause | 2,915 | 0 | 9 | 682 | 1,255 | 794 | 461 | 35 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
-- !!! test various I/O Requests
--
--
import Control.Exception
import System.Environment
import System.IO
import Debug.Trace (trace)
import Text.Regex
import Data.Maybe
main = do
prog <- getProgName
let Just (name:_) = matchRegex (mkRegex ".*(cgrun025)") prog
hPutStr s... | ezyang/ghc | testsuite/tests/codeGen/should_run/cgrun025.hs | bsd-3-clause | 700 | 0 | 12 | 147 | 228 | 109 | 119 | 21 | 1 |
import Text.Pandoc.JSON
main :: IO ()
main = toJSONFilter removeNotes
removeNotes :: Inline -> Inline
removeNotes (Note _) = Str ""
removeNotes x = x
| michaelbeaumont/pandoc | man/removeNotes.hs | gpl-2.0 | 153 | 0 | 7 | 28 | 59 | 30 | 29 | 6 | 1 |
module T9838 where
import T9838a
foo :: EqShow a => a -> String
foo x = show x ++ show (x == x)
bar :: F Int -> Bool
bar x = x | ghc-android/ghc | testsuite/tests/polykinds/T9838.hs | bsd-3-clause | 129 | 0 | 8 | 35 | 68 | 35 | 33 | 6 | 1 |
module Bar where
import Foo
| ryantm/ghc | testsuite/tests/driver/bug1677/Bar.hs | bsd-3-clause | 28 | 0 | 3 | 5 | 7 | 5 | 2 | 2 | 0 |
-- | Multicore code generation for 'SegMap'.
module Futhark.CodeGen.ImpGen.Multicore.SegMap
( compileSegMap,
)
where
import Control.Monad
import qualified Futhark.CodeGen.ImpCode.Multicore as Imp
import Futhark.CodeGen.ImpGen
import Futhark.CodeGen.ImpGen.Multicore.Base
import Futhark.IR.MCMem
import Futhark.Trans... | diku-dk/futhark | src/Futhark/CodeGen/ImpGen/Multicore/SegMap.hs | isc | 1,664 | 0 | 15 | 324 | 589 | 292 | 297 | 48 | 1 |
module Main where
import Avus
main :: IO ()
main = processScan defaultConfig
| srenatus/avus | src-exec/Main.hs | mit | 89 | 0 | 6 | 25 | 25 | 14 | 11 | 4 | 1 |
safediv::Int->Int->Maybe Int
safediv _ 0=Nothing
safediv m n=Just (m`div`n)
-- ok, δΊ§ηδΊζζ°δ» Just ιζΏεΊζ₯ηιζ±...
data Tree = Leaf Int | Node Tree Int Tree
t1 = Node (Node (Leaf 1) 3 (Leaf 4)) 5 (Node (Leaf 6) 7 (Leaf 9))
occurs :: Int -> Tree -> Bool
occurs m (Leaf n) = m==n
occurs m (Node l n r) = m==n || occurs m l || o... | SnowOnion/GrahamHaskellPractice | ch10/play.hs | mit | 708 | 0 | 9 | 148 | 346 | 174 | 172 | -1 | -1 |
{-# LANGUAGE BangPatterns #-}
module GameLogic where
import Graphics.UI.SDL as SDL
import Control.Monad.Trans.State.Lazy (StateT, get, put, runStateT)
import Control.Monad.IO.Class (liftIO, MonadIO)
import Control.Monad (unless, when)
import System.CPUTime (getCPUTime)
import GOL
import GameState
import UI
runSimula... | Lateks/gol | src/GameLogic.hs | mit | 1,592 | 0 | 13 | 360 | 466 | 241 | 225 | 42 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.