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 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/DeactivateMFADevice.hs | mpl-2.0 | 3,910 | 0 | 9 | 755 | 445 | 272 | 173 | 63 | 1 |
{-# LANGUAGE CPP, ForeignFunctionInterface, DeriveDataTypeable #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-----------------------------------------------------------------------------------------
{-| Module : WxcTypes
Copyright : (c) Daan Leijen 2003, 2004
License : wxWindows
Maintainer : wxhas... | ekmett/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs | lgpl-2.1 | 49,920 | 0 | 18 | 11,108 | 14,155 | 7,197 | 6,958 | 944 | 3 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="zh-CN">
<title>Ruby Scripting</title>
<maps>
<homeID>top</homeID>
<mapref location="ma... | veggiespam/zap-extensions | addOns/jruby/src/main/javahelp/org/zaproxy/zap/extension/jruby/resources/help_zh_CN/helpset_zh_CN.hs | apache-2.0 | 960 | 81 | 65 | 157 | 407 | 206 | 201 | -1 | -1 |
module BCode
( BCode(..)
, BCodePath(..)
, encode
, decode
, search
, searchInt
, searchStr
) where
import Control.Applicative ((<$>), (<*>), (<|>), (*>), (<*))
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as B8
import... | artems/htorr | src/BCode.hs | bsd-3-clause | 3,114 | 0 | 12 | 736 | 1,289 | 681 | 608 | 88 | 4 |
{-
- Copyright (c) 2010 Mats Rauhala <mats.rauhala@gmail.com>
-
- 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 us... | sjakobi/zsh-battery | Files.hs | bsd-3-clause | 1,995 | 0 | 11 | 369 | 249 | 141 | 108 | 22 | 2 |
-----------------------------------------------------------------------------
-- |
-- Module : Data.OrgMode.Parse.Attoparsec.Section
-- Copyright : © 2015 Parnell Springmeyer
-- License : All Rights Reserved
-- Maintainer : Parnell Springmeyer <parnell@digitalmentat.com>
-- Stability : stable
--
-- P... | imalsogreg/orgmode-parse | src/Data/OrgMode/Parse/Attoparsec/Section.hs | bsd-3-clause | 1,970 | 0 | 12 | 624 | 266 | 162 | 104 | 25 | 1 |
{-
Copyright (C) 2007-2010 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 ... | sol/pandoc | src/Text/Pandoc/Readers/TeXMath.hs | gpl-2.0 | 4,922 | 0 | 13 | 1,182 | 1,540 | 773 | 767 | 83 | 17 |
#!/usr/bin/env runhaskell
-- Generate data.h and data.c
import Data.List (intercalate, partition, unfoldr)
-- http://unthingable.eat-up.org/tag/music.html
-- | Euclidean rhythm generator
euclidean :: Int -- ^ fill steps
-> Int -- ^ total steps
-> [Bool]
euclidean k n = concat... | scanner-darkly/mod | teletype/euclidean/euclidean.hs | gpl-2.0 | 2,761 | 0 | 12 | 702 | 938 | 498 | 440 | 53 | 2 |
module Reflex.DynamicWriter
{-# DEPRECATED "Use 'Reflex.DynamicWriter.Class' and 'Reflex.DynamicWrite.Base' instead, or just import 'Reflex'" #-}
( module X
) where
import Reflex.DynamicWriter.Base as X
import Reflex.DynamicWriter.Class as X
| ryantrinkle/reflex | src/Reflex/DynamicWriter.hs | bsd-3-clause | 249 | 0 | 4 | 34 | 29 | 21 | 8 | 5 | 0 |
{-# LANGUAGE TupleSections, GeneralizedNewtypeDeriving #-}
-- |A simple graph implementation backed by 'Data.HashMap'.
module Data.RDF.MGraph(MGraph, empty, mkRdf, triplesOf, uniqTriplesOf, select, query)
where
import Prelude hiding (pred)
import Control.DeepSeq (NFData)
import Data.RDF.Types
import Data.RDF.Query
i... | ddssff/rdf4h | src/Data/RDF/MGraph.hs | bsd-3-clause | 6,482 | 0 | 13 | 1,312 | 2,474 | 1,346 | 1,128 | 112 | 3 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TupleSections #-}
-- | Construct a @Plan@ for how to build
module Stack.Build.ConstructPlan
( constr... | kairuku/stack | src/Stack/Build/ConstructPlan.hs | bsd-3-clause | 22,289 | 0 | 27 | 7,214 | 5,696 | 2,864 | 2,832 | 486 | 9 |
module PfeSocket(listenOnPFE,connectToPFE,acceptPFE,removePFE,
pfeClient,clientOps,serverOps,sResult,errorString) where
import Prelude hiding (putStr,readIO)
import Network(listenOn,accept,connectTo,PortID(..))
import IO(hPutStrLn,hPrint,hGetLine,hGetContents,hClose,hSetBuffering,BufferMode(..))
import... | forste/haReFork | tools/pfe/PfeSocket.hs | bsd-3-clause | 2,141 | 10 | 13 | 507 | 706 | 373 | 333 | 58 | 4 |
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveFoldable, DeriveTraversable #-}
module Distribution.Client.Dependency.Modular.PSQ where
-- Priority search queues.
--
-- I am not yet sure what exactly is needed. But we need a data structure with
-- key-based lookup that can be sorted. We're using a sequence right now... | DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/Dependency/Modular/PSQ.hs | bsd-3-clause | 2,802 | 0 | 15 | 750 | 1,491 | 779 | 712 | 61 | 2 |
{-# OPTIONS -fno-warn-redundant-constraints #-}
-- !!! This is the example given in TcDeriv
--
module ShouldSucceed where
data T a b
= C1 (Foo a) (Bar b)
| C2 Int (T b a)
| C3 (T a a)
deriving Eq
data Foo a = MkFoo Double a deriving ()
instance (Eq a) => Eq (Foo a)
data Bar a = MkBar Int Int deriving ()
i... | urbanslug/ghc | testsuite/tests/deriving/should_compile/drv003.hs | bsd-3-clause | 365 | 0 | 8 | 90 | 146 | 82 | 64 | -1 | -1 |
-- !! check if tc type substitutions really do
-- !! clone (or if not, work around it by cloning
-- !! all binders in first pass of the simplifier).
module ShouldCompile where
f,g :: Eq a => (a,b)
f = g
g = f
| sdiehl/ghc | testsuite/tests/typecheck/should_compile/tc099.hs | bsd-3-clause | 210 | 0 | 6 | 46 | 37 | 24 | 13 | 4 | 1 |
{-# LANGUAGE PatternSynonyms #-}
module Main where
pattern First x <- x:_ where
First x = foo [x, x, x]
foo :: [a] -> [a]
foo xs@(First x) = replicate (length xs + 1) x
main = mapM_ print $ First ()
| ghc-android/ghc | testsuite/tests/patsyn/should_run/bidir-explicit-scope.hs | bsd-3-clause | 204 | 0 | 8 | 47 | 105 | 56 | 49 | 7 | 1 |
module System.Apotiki.Debian.Control (DebInfo, ctlFromData) where
import System.Apotiki.Utils
import Data.Attoparsec.Combinator (manyTill, many1)
import Data.ByteString.Char8 (pack, unpack)
import Data.List (intersperse)
import qualified Data.Map as M
import qualified Data.ByteString as B
import qualified Data.Attopars... | pyr/apotiki | System/Apotiki/Debian/Control.hs | isc | 1,167 | 0 | 12 | 176 | 398 | 213 | 185 | 30 | 2 |
to_tens :: Integer -> [Integer]
to_tens 0 = []
to_tens n = to_tens (n `div` 10) ++ [n `mod` 10]
isPrime :: Integer -> Bool
isPrime 1 = False
isPrime k
| k <= 0 = False
|otherwise = null [ x | x <- [2..(truncate $ sqrt $ fromIntegral k)], k `mod` x == 0]
from_tens xs = sum $ map (\(a,b) -> 10^a * b)... | stefan-j/ProjectEuler | q37.hs | mit | 1,093 | 10 | 13 | 268 | 509 | 262 | 247 | 24 | 1 |
-- Isomorphism
-- https://www.codewars.com/kata/5922543bf9c15705d0000020
module ISO where
import Data.Void
import Data.Tuple(swap)
import Control.Arrow ((***), (+++))
type ISO a b = (a -> b, b -> a)
substL :: ISO a b -> (a -> b)
substL = fst
substR :: ISO a b -> (b -> a)
substR = snd
isoBool :: ISO Bool Bool
isoB... | gafiatulin/codewars | src/3 kyu/Isomorphism.hs | mit | 1,582 | 0 | 11 | 419 | 924 | 497 | 427 | 42 | 3 |
module S8_1 where
-- Tipo das funções utilizadas em divideAndConquer
--ind :: p -> Bool
--solve :: p -> s
--divide :: p -: [s]
--combine :: p -> [s] -> s
divideAndConquer :: ( p -> Bool) -> (p -> s) -> (p -> [p]) -> (p -> [s] -> s)
-> p -> s
divideAndConquer ind solve divide combine initPb
= dc' initPb
... | gustavoramos00/tecnicas-topdown | S8_1.hs | mit | 1,261 | 0 | 12 | 472 | 529 | 279 | 250 | 24 | 1 |
module PosNegIf where
posOrNeg x =
if x >= 0
then "Pos "
else "Neg "
-- note no returns or paren
| HaskellForCats/HaskellForCats | simpcondi1.hs | mit | 106 | 6 | 6 | 31 | 31 | 18 | 13 | 5 | 2 |
module Nodes.Statement where
import Nodes
import Nodes.Expression (Expr)
data Stmt
= Line { expr :: Expr }
instance AstNode Stmt where
ast (Line expr) = ast expr
| milankinen/cbhs | src/nodes/Statement.hs | mit | 169 | 0 | 8 | 34 | 59 | 33 | 26 | 7 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Betfair.StreamingAPI.API.ToRequest
( ToRequest
, toRequest
) where
-- import Protolude
import Betfair.StreamingAPI.API.Request
import qualified Betfair.StreamingAPI.Requests.AuthenticationMessage as A
import qualified Bet... | joe9/streaming-betfair-api | src/Betfair/StreamingAPI/API/ToRequest.hs | mit | 917 | 0 | 7 | 133 | 168 | 100 | 68 | 20 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
import Data.Attoparsec.ByteString.Char8 hiding (take)
import qualified Data.ByteString as B
import Control.Applicative
import Data.List (sortBy, groupBy, maximumBy, transpose)
import Data.Ord (comparing)
import Data.Function (on)
import qualified Data... | devonhollowood/adventofcode | 2015/day14/day14.hs | mit | 2,114 | 0 | 12 | 473 | 752 | 406 | 346 | 55 | 2 |
lucky :: Int -> String
lucky 7 = "LUCKY NUMBER SEVEN!"
lucky x = "Sorry, you're out of luck, pal!"
sayMe :: Int -> String
sayMe 1 = "One!"
sayMe 2 = "Two!"
sayMe 3 = "Three!"
sayMe 4 = "Four!"
sayMe 5 = "Five!"
sayMe x = "Not between 1 and 5"
factrial :: Int -> Int
factrial 0 = 1
factrial n = n * factrial (n - 1)
ad... | yhoshino11/learning_haskell | ch3.hs | mit | 4,601 | 0 | 11 | 1,295 | 1,357 | 735 | 622 | 88 | 3 |
module Compiler.GCC.JIT.Monad.Result where
import Compiler.GCC.JIT.Monad.Utilities
import Compiler.GCC.JIT.Monad.Types
import Compiler.GCC.JIT.Foreign.Types
import Compiler.GCC.JIT.Foreign.Context
import Foreign.Ptr
import Data.ByteString (ByteString)
import Control.Monad.IO.Class (liftIO)
-- * Result functions
... | Slowki/hgccjit | src/Compiler/GCC/JIT/Monad/Result.hs | mit | 1,311 | 0 | 9 | 263 | 251 | 141 | 110 | 28 | 1 |
-----------------------------------------------------------------------------
-- |
-- Module : Aether.Parser
-- Copyright : (c) Allen Guo 2013
-- License : MIT
--
-- Maintainer : Allen Guo <guoguo12@gmail.com>
-- Stability : alpha
--
-- This module contains several simple XML-parsing regex
-- functions, as well ... | guoguo12/aether | src/Aether/Parser.hs | mit | 2,275 | 0 | 9 | 463 | 355 | 201 | 154 | 26 | 2 |
{-
Author: Nick(Mykola) Pershyn
Language: Haskell
Program: Dominion Server
-}
import Data.List
import System.IO
import System.Process
import System.Environment
import System.Exit
import DominionTypes
main = do
myArgs <- getArgs
let players = myArgs
let playerProcs = map (\x -> createProcess (proc x []){std_in ... | LinuxUser404/haskell-dominion | src/DominionServer.hs | gpl-2.0 | 786 | 0 | 17 | 130 | 274 | 142 | 132 | 19 | 1 |
module TH.MetaLabel (
makeMakeLabel
, makeMakeLabels
) where
import Types
import Utils
import Prelude
import Language.Haskell.TH
import Language.Haskell.TH.Syntax (sequenceQ)
makeMakeLabels :: [(String, String)] -> Q [Dec]
makeMakeLabels ns = fmap con... | NorfairKing/the-notes | src/TH/MetaLabel.hs | gpl-2.0 | 2,057 | 0 | 15 | 1,073 | 417 | 226 | 191 | -1 | -1 |
{- |
Description : logic for OMG's query/view/transformation language
Copyright : (c) Otto-von-Guericke University of Magdeburg
License : GPLv2 or higher, see LICENSE.txt
The "QVTR" folder contains the skeleton of
an instance of "Logic.Logic" for the query/view/transformation language defined by OMG and used ... | spechub/Hets | QVTR.hs | gpl-2.0 | 436 | 0 | 2 | 70 | 5 | 4 | 1 | 1 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE Sta... | atsukotakahashi/wi | src/library/Yi/Snippets.hs | gpl-2.0 | 14,467 | 2 | 21 | 4,055 | 4,310 | 2,153 | 2,157 | -1 | -1 |
{- |
Properties of node-connected components.
-}
module Data.Grid.Node
(
-- * Everything here is node-connected
Noded (..)
-- * Basic node characteristics
, Bus (..)
-- * Static node-connected components
, ShuntAdmittance (..)
, Generator (..)
, Load (..)
) where
-- Local:
import Data.Grid.Types
import Data.Gr... | JohanPauli/Hunger | src/Data/Grid/Node.hs | gpl-3.0 | 1,377 | 0 | 9 | 269 | 320 | 182 | 138 | 30 | 0 |
module Language.C2ATS.FlatGlobalDecl
( FlatGlobalDecl (..)
, FlatG (..)
, MapFlatG (..)
, noposSueref
, realPath
) where
import Data.Map (Map)
import System.Process
import System.Exit
import Language.C
import Language.C.Analysis
data FlatGlobalDecl = FGObj IdentDecl
... | metasepi/c2ats | src/Language/C2ATS/FlatGlobalDecl.hs | gpl-3.0 | 944 | 0 | 9 | 261 | 302 | 167 | 135 | 28 | 1 |
module Wordify.Rules.Game(Game,
makeGame,
movesMade,
gameStatus,
board,
bag,
dictionary,
moveNumber,
player1,
... | Happy0/haskellscrabble | src/Wordify/Rules/Game.hs | gpl-3.0 | 4,959 | 0 | 15 | 1,519 | 1,191 | 648 | 543 | 89 | 5 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.YouTube.Types
-- Copyright : (c) 2015-2016 Brendan Hay... | brendanhay/gogol | gogol-youtube/gen/Network/Google/YouTube/Types.hs | mpl-2.0 | 49,201 | 0 | 7 | 12,127 | 5,634 | 3,918 | 1,716 | 1,510 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Repricingrules/Create.hs | mpl-2.0 | 5,565 | 0 | 19 | 1,340 | 882 | 510 | 372 | 127 | 1 |
-- This Source Code Form is subject to the terms of the Mozilla Public
-- License, v. 2.0. If a copy of the MPL was not distributed with this
-- file, You can obtain one at http://mozilla.org/MPL/2.0/.
{-# LANGUAGE OverloadedStrings #-}
module Network.APNS.Protocol.Types where
import Data.Aeson
import Data.Aeson.TH
... | tiago-loureiro/apns | src/Network/APNS/Protocol/Types.hs | mpl-2.0 | 2,607 | 0 | 16 | 798 | 601 | 350 | 251 | 80 | 1 |
module ModuleConf where
import Conf
import Distribution.PackageDescription (Library,ConfVar,CondTree,condLibrary)
import Distribution.Package (Dependency)
import Distribution.PackageDescription.Parse (readPackageDescription)
import Distribution.Verbosity (silent)
import Control.Monad.IO.Class (liftIO)
data ModuleFl... | phischu/conf | src/ModuleConf.hs | agpl-3.0 | 829 | 0 | 13 | 108 | 237 | 131 | 106 | 16 | 2 |
module HW05_ExprT where
data ExprT = Lit Integer
| Add ExprT ExprT
| Mul ExprT ExprT
deriving (Show, Eq)
| haroldcarr/learn-haskell-coq-ml-etc | haskell/course/2014-06-upenn/cis194/src/HW05_ExprT.hs | unlicense | 130 | 0 | 6 | 44 | 38 | 22 | 16 | 5 | 0 |
module Main where
import Primes
import Digits
import Data.List
isPandigital :: Int -> Bool
isPandigital num = [1..length numDigits] == (sort numDigits)
where
numDigits = digits num
biggestPandigitalPrime = head [ x | x <- downwards(7654321), isPandigital x, isPrime x ]
where
downwards num = num:downwards... | kliuchnikau/project-euler | 041/Main.hs | apache-2.0 | 367 | 0 | 10 | 67 | 132 | 69 | 63 | 10 | 1 |
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TupleSections #-}
module Tetris.Board where
import Control.Lens
import Data.Bool
import Data.Maybe
import Data.Monoid
import Data.Eq
import Data.Function (($),... | melrief/tetris | src/Tetris/Board.hs | apache-2.0 | 3,981 | 0 | 22 | 1,072 | 932 | 526 | 406 | 64 | 6 |
{-# LANGUAGE TemplateHaskell #-}
{-| PyType helper for Ganeti Haskell code.
-}
{-
Copyright (C) 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code mus... | yiannist/ganeti | src/Ganeti/THH/PyType.hs | bsd-2-clause | 4,876 | 0 | 10 | 1,289 | 971 | 520 | 451 | 83 | 9 |
{-# LANGUAGE TypeFamilies, TypeOperators, TupleSections #-}
{-# OPTIONS_GHC -Wall #-}
----------------------------------------------------------------------
-- |
-- Module : FunctorCombo.Holey
-- Copyright : (c) Conal Elliott 2010
-- License : BSD3
--
-- Maintainer : conal@conal.net
-- Stability : e... | conal/functor-combo | src/FunctorCombo/Holey.hs | bsd-3-clause | 5,004 | 0 | 13 | 1,209 | 1,093 | 600 | 493 | 44 | 1 |
{-# LANGUAGE ViewPatterns, RecordWildCards #-}
module Cabal(
Cabal(..), CabalSection(..), CabalSectionType,
parseCabal,
selectCabalFile,
selectHiFiles
) where
import System.IO.Extra
import System.Directory.Extra
import System.FilePath
import qualified Data.HashMap.Strict as Map
import Util
import ... | ndmitchell/weeder | src/Cabal.hs | bsd-3-clause | 6,213 | 0 | 20 | 1,554 | 2,102 | 1,109 | 993 | -1 | -1 |
module Data.TTask.File.Compatibility.V0_0_1_0
( readProject
) where
import Data.Functor
import Safe
import Data.Time
import Control.Lens
import qualified Data.TTask.Types.Types as T
data Task = Task
{ taskId :: T.Id
, taskDescription :: String
, taskPoint :: Int
, taskStatus :: T.TStatus
, taskWorkTime... | tokiwoousaka/ttask | src/Data/TTask/File/Compatibility/V0_0_1_0.hs | bsd-3-clause | 2,120 | 0 | 10 | 414 | 654 | 371 | 283 | 66 | 1 |
module DataParsers where
import CSV
import Text.ParserCombinators.Parsec hiding (labels)
import DataTypes
import Control.Monad.Except
import Data.IORef
import Data.Char
import Text.Read hiding (String)
fromRight :: Either a b -> b
fromRight (Right b) = b
maybeToTop :: Maybe WVal -> WVal
maybeToTop (Just w) = w
maybeT... | knalbant/wrangell | DataParsers.hs | bsd-3-clause | 2,658 | 0 | 13 | 557 | 916 | 461 | 455 | 54 | 4 |
{-# LANGUAGE FlexibleContexts #-}
module Cologne.Shaders.Debug (
debug
) where
import Control.Monad.ST
import Data.STRef (newSTRef, readSTRef, writeSTRef)
import Control.Monad.State (State, runState)
import Data.Vect (Vec3(Vec3), (&+), (&*), (&.), (&^), len, normalize)
import Data.Vector.Mutable (MVector, new, ... | joelburget/Cologne | Cologne/Shaders/Debug.hs | bsd-3-clause | 2,120 | 0 | 22 | 574 | 844 | 449 | 395 | 48 | 2 |
-- | Settings are centralized, as much as possible, into this file. This
-- includes database connection settings, static file locations, etc.
-- In addition, you can configure a number of different aspects of Yesod
-- by overriding methods in the Yesod typeclass. That instance is
-- declared in the Foundation.hs file.... | mitchellwrosen/dohaskell | src/Settings.hs | bsd-3-clause | 5,495 | 0 | 12 | 1,486 | 719 | 412 | 307 | -1 | -1 |
-- -----------------------------------------------------------------------------
--
-- Info.hs, part of Alex
--
-- (c) Simon Marlow 2003
--
-- Generate a human-readable rendition of the state machine.
--
-- ----------------------------------------------------------------------------}
module Text.Luthor.Info ( infoDFA... | ekmett/luthor | Text/Luthor/Info.hs | bsd-3-clause | 1,781 | 11 | 20 | 425 | 487 | 256 | 231 | 40 | 3 |
module Network.Kafka.Protocol where
| iand675/hs-kafka | src/Network/Kafka/Protocol.hs | bsd-3-clause | 36 | 0 | 3 | 3 | 7 | 5 | 2 | 1 | 0 |
{-# LANGUAGE DeriveDataTypeable #-}
module Main where
import System.Console.CmdArgs
import Com.DiagClient(sendData)
import DiagnosticConfig
import Control.Monad (when)
import Network.Socket
import Script.ErrorMemory
import Script.LoggingFramework
import Numeric(showHex,readHex)
import Util.Encoding
import Data.Word
im... | marcmo/hsDiagnosis | Main.hs | bsd-3-clause | 3,113 | 0 | 15 | 841 | 896 | 478 | 418 | 66 | 3 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
module Test.Themis.Keyword (
Keyword
, runKeyword
, Context(..)
, Action
, safeAction
, safeActionRollback
, action
, actionRollback
, Interpretation(..)
, step
, info
, assertEquals
, satisfies
... | andorp/themis | src/Test/Themis/Keyword.hs | bsd-3-clause | 5,287 | 0 | 17 | 1,192 | 1,737 | 899 | 838 | 93 | 3 |
module Config where
import Data.List
import HSH
-- put any custom default excluded directories or aliased filetypes here etc
sourceFiles :: [String] -> String -> IO [String]
sourceFiles ftypes dir = run ("find", dir:args) where
args = intercalate ["-or"] [["-iname", "*." ++ ftype] | ftype <- ftypes]
| facebookarchive/lex-pass | src/Config.hs | bsd-3-clause | 306 | 0 | 10 | 52 | 94 | 53 | 41 | 6 | 1 |
{-# LANGUAGE CPP, DisambiguateRecordFields, RecordWildCards, NamedFieldPuns #-}
{-# LANGUAGE BangPatterns #-}
-- | This module implements parsing and unparsing functions for
-- OpenFlow messages. It exports a driver that can be used to read messages
-- from a file handle and write messages to a handle.
module Nettle.... | brownsys/nettle-openflow | src/Nettle/OpenFlow/MessagesBinary.hs | bsd-3-clause | 76,633 | 6 | 26 | 26,102 | 16,295 | 8,358 | 7,937 | -1 | -1 |
module Main where
import Data.List (intersperse)
import Data.List.Split (splitOn)
import System.Environment (getArgs)
import Control.Distributed.Task.Distribution.LogConfiguration (initDefaultLogging)
import Control.Distributed.Task.Distribution.RunComputation
import Control.Distributed.Task.Distribution.TaskDistribu... | michaxm/task-distribution | app/Main.hs | bsd-3-clause | 4,444 | 0 | 15 | 825 | 994 | 528 | 466 | 78 | 17 |
module Mistral.TypeCheck.Interface (
genIface
) where
import Mistral.ModuleSystem.Interface
import Mistral.TypeCheck.AST
import Mistral.Utils.SCC ( groupElems )
import Data.Foldable ( foldMap )
import qualified Data.Map as Map
-- | Generate an interface from a core module.
genIface :: Module -> Ifac... | GaloisInc/mistral | src/Mistral/TypeCheck/Interface.hs | bsd-3-clause | 927 | 0 | 10 | 271 | 234 | 132 | 102 | 19 | 1 |
module ETA.TypeCheck.TcFlatten(
FlattenEnv(..), FlattenMode(..), mkFlattenEnv,
flatten, flattenMany, flatten_many,
flattenFamApp, flattenTyVarOuter,
unflatten,
eqCanRewrite, eqCanRewriteFR, canRewriteOrSame,
CtFlavourRole, ctEvFlavourRole, ctFlavourRole
) where
import ETA.TypeCheck.TcRnTypes
import ... | alexander-at-github/eta | compiler/ETA/TypeCheck/TcFlatten.hs | bsd-3-clause | 58,244 | 47 | 25 | 16,486 | 5,173 | 2,798 | 2,375 | 349 | 9 |
{-# LANGUAGE OverloadedStrings #-}
module Spin
( SourceID
, Source (..)
, session
, yield
, dedup
, Sink (..)
, sinkFile
, sinkYarn
, spin
) where
import Control.Monad (ap, liftM)
import Control.Monad.IO.Class (MonadIO (..), liftIO)
impor... | yuttie/fibers | Spin.hs | bsd-3-clause | 3,531 | 0 | 14 | 1,199 | 1,427 | 729 | 698 | 95 | 8 |
-- Copyright (c) 2015 Eric McCorkle. All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
-- 1. Redistributions of source code must retain the above copyright
-- notice, this list of conditi... | emc2/iridium | src/IR/Common/Rename/Class.hs | bsd-3-clause | 2,588 | 0 | 9 | 520 | 276 | 166 | 110 | 18 | 0 |
fibs :: [Integer]
fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
main :: IO ()
main = print $ fst $ head $ dropWhile not1000 $ zip [0..] fibs
where not1000 (_,x) = (length $ show x) /= 1000
| stulli/projectEuler | eu25.hs | bsd-3-clause | 192 | 0 | 10 | 47 | 109 | 57 | 52 | 5 | 1 |
module RefacWhereLet(whereToLet) where
import PrettyPrint
import PosSyntax
import AbstractIO
import Maybe
import TypedIds
import UniqueNames hiding (srcLoc)
import PNT
import TiPNT
import List
import RefacUtils hiding (getParams)
import PFE0 (findFile)
import MUtils (( # ))
import RefacLocUtils
import System
import ... | forste/haReFork | refactorer/RefacWhereLet.hs | bsd-3-clause | 7,907 | 0 | 26 | 2,988 | 2,403 | 1,201 | 1,202 | -1 | -1 |
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
module Iso where
import Data.Functor.Contravariant (Contravariant, (>$<), contramap)
import Person
import Control.Monad.Reader
import Data.Profunctor
import Data.Functor.Identity
import Getter (view)
-- | Exchange an ContraExchange types which are use... | sebashack/LensPlayground | src/Iso.hs | bsd-3-clause | 2,440 | 0 | 11 | 563 | 922 | 492 | 430 | 54 | 1 |
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances, TupleSections, ScopedTypeVariables #-}
{-|
A module defining an interface for type attribution, the process by which
nodes in an AST are assigned constrained types.
-}
module Language.K3.TypeSystem.Monad.Iface.TypeAttribution
( TypeVarAttrI(..)
) where
impor... | DaMSL/K3 | src/Language/K3/TypeSystem/Monad/Iface/TypeAttribution.hs | apache-2.0 | 761 | 0 | 10 | 116 | 89 | 55 | 34 | 8 | 0 |
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
module Kalium.Nucleus.Vector.Program where
import Kalium.Prelude
import Kalium.Util
import Control.Monad.Rename
data NameSpecial
= OpAdd
| OpSubtract
| OpMultiply
| OpDivide
| OpDiv
| OpMod
... | rscprof/kalium | src/Kalium/Nucleus/Vector/Program.hs | bsd-3-clause | 5,397 | 0 | 14 | 1,491 | 1,860 | 986 | 874 | -1 | -1 |
{-# LANGUAGE Haskell98, BangPatterns #-}
{-# LINE 1 "Data/ByteString/Lazy/Search.hs" #-}
-- |
-- Module : Data.ByteString.Lazy.Search
-- Copyright : Daniel Fischer
-- Chris Kuklewicz
-- Licence : BSD3
-- Maintainer : Daniel Fischer <daniel.is.fischer@googlemail.com>
-- Stability... | phischu/fragnix | tests/packages/scotty/Data.ByteString.Lazy.Search.hs | bsd-3-clause | 14,655 | 0 | 9 | 3,651 | 669 | 504 | 165 | 67 | 1 |
{-# LANGUAGE Haskell98, MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances #-}
{-# LINE 1 "Control/Monad/Cont/Class.hs" #-}
{- |
Module : Control.Monad.Cont.Class
Copyright : (c) The University of Glasgow 2001,
(c) Jeff Newbern 2003-2007,
(c) Andriy Palamarchuk 2007
... | phischu/fragnix | tests/packages/scotty/Control.Monad.Cont.Class.hs | bsd-3-clause | 5,256 | 0 | 12 | 863 | 691 | 390 | 301 | 48 | 0 |
-- This module actually contains data. It is specific to the Gtk+ libs that
-- we're playing with. If we really cared enough we could split this
-- information out into seperate data files that get read in at runtime.
-- However for now it's easier just to edit the data here and recompile.
module MarshalFixup where
i... | k0001/gtk2hs | tools/apiGen/src/MarshalFixup.hs | gpl-3.0 | 24,475 | 0 | 21 | 2,568 | 4,918 | 3,135 | 1,783 | 488 | 3 |
{-#LANGUAGE RecordWildCards, ScopedTypeVariables, TypeFamilies#-}
module CV.Features (SURFParams, defaultSURFParams, mkSURFParams, getSURF
,moments,Moments,getSpatialMoment,getCentralMoment,getNormalizedCentralMoment) where
import CV.Image
import CV.Bindings.Types
import CV.Bindings.Features
import F... | BeautifulDestinations/CV | CV/Features.hs | bsd-3-clause | 5,004 | 0 | 29 | 1,621 | 1,090 | 577 | 513 | 84 | 2 |
-- -----------------------------------------------------------------------------
--
-- (c) The University of Glasgow 1994-2004
--
-- -----------------------------------------------------------------------------
{-# OPTIONS_GHC -fno-warn-tabs #-}
-- The above warning supression flag is a temporary kludge.
-- While wor... | ryantm/ghc | compiler/nativeGen/SPARC/Regs.hs | bsd-3-clause | 6,744 | 208 | 12 | 1,583 | 1,342 | 936 | 406 | 152 | 10 |
<?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="pl-PL">
<title>Common Library</title>
<maps>
<homeID>commonlib</homeID>
<mapref locatio... | thc202/zap-extensions | addOns/commonlib/src/main/javahelp/help_pl_PL/helpset_pl_PL.hs | apache-2.0 | 965 | 90 | 29 | 156 | 390 | 209 | 181 | -1 | -1 |
{-# OPTIONS_GHC -cpp #-}
{-+
This module implements environments (symbol tables) as finite maps.
Finite maps are not necessarily faster than simple association lists, since
although lookups change from O(n) to O(log n), extension changes from
O(1) to O(log n), and the latter cost can be the dominating cost...
-}
modul... | kmate/HaRe | old/tools/base/TI/TiEnvFM.hs | bsd-3-clause | 1,422 | 0 | 8 | 249 | 307 | 168 | 139 | 17 | 1 |
module B (name) where
name :: String
name = "Samantha"
| sdiehl/ghc | testsuite/tests/driver/T16511/B1.hs | bsd-3-clause | 56 | 0 | 4 | 11 | 19 | 12 | 7 | 3 | 1 |
module Mod120_A(T) where
data T = Foo
| urbanslug/ghc | testsuite/tests/module/Mod120_A.hs | bsd-3-clause | 39 | 0 | 5 | 8 | 16 | 10 | 6 | 2 | 0 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Turtle
import qualified Data.Maybe as Maybe
import qualified Search as Search
main :: IO ()
main = sh $ do
boss <- options "Day 21" parser
let minimal = Loadout 0 Nothing Nothing Nothing
let won_fight load = battle (ma... | devonhollowood/adventofcode | 2015/day21/day21.hs | mit | 5,700 | 0 | 15 | 1,341 | 2,086 | 1,077 | 1,009 | 158 | 4 |
module Three where
import Test.QuickCheck
import Test.QuickCheck.Checkers
data Three a b c = Three a b c
deriving (Eq, Ord, Show)
--
instance Functor (Three a b) where
fmap f (Three a b c) = Three a b (f c)
instance Foldable (Three a b) where
foldMap f (Three a b c) = f c
instance Traversable (Three a b) w... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter21/Exercises/src/Three.hs | mit | 593 | 0 | 8 | 137 | 286 | 150 | 136 | 15 | 0 |
module Gen.Core
( surroundWith
, smallArbitrary
, maybeGen
, genNothing
, module Language.GoLite.Syntax
, module Control.Monad
, module Test.Hspec
, module Test.Hspec.QuickCheck
, module Test.QuickCheck
) where
import Language.GoLite.Syntax
import Control.Monad
import Test.Hspec
import Test.Hspec.QuickCheck
import Te... | djeik/goto | test/Gen/Core.hs | mit | 1,104 | 0 | 8 | 176 | 266 | 157 | 109 | 24 | 1 |
module
Foo
| chreekat/vim-haskell-syntax | test/golden/module-firstline.hs | mit | 11 | 0 | 2 | 2 | 4 | 3 | 1 | -1 | -1 |
--
-- Find the greatest product of five consecutive digits in the 1000-digit number.
--
number
= "73167176531330624919225119674426574742355349194934"
++ "96983520312774506326239578318016984801869478851843"
++ "85861560789112949495459501737958331952853208805511"
++ "12540698747158523863050715693290... | stu-smith/project-euler-haskell | Euler-008.hs | mit | 1,556 | 41 | 9 | 217 | 226 | 103 | 123 | 28 | 1 |
{-# LANGUAGE FlexibleContexts #-}
module Dissent.Protocol.Shuffle.Leader where
import Control.Monad.Error
import Control.Monad.Trans.Resource
import Data.List (sortBy)
import qualified Network.Socket as NS
import qualified Dissent.Crypto.Rsa ... | solatis/dissent | src/Dissent/Protocol/Shuffle/Leader.hs | mit | 3,730 | 0 | 17 | 1,122 | 684 | 366 | 318 | 59 | 2 |
#!/usr/bin/env stack
-- stack --install-ghc runghc --package turtle
{-# LANGUAGE OverloadedStrings #-}
import Turtle
main = stdout $ grep ((star dot) <> "monads" <> (star dot)) $ input "README.md"
| JoshuaGross/haskell-learning-log | Code/turtle/grep.hs | mit | 210 | 1 | 12 | 42 | 52 | 26 | 26 | 3 | 1 |
Config
{ font = "xft:Inconsolata:size=13"
, bgColor = "#3a3a3a"
, fgColor = "#dcdccc"
, position = Top
, commands =
[ Run MPD
[ "--template", "<statei> <fc=#8cd0d3><title></fc> - <fc=#f0dfaf><artist></fc> - <lapsed>/<remaining>"
, "--"
... | randalloveson/dotfiles | xmonad/.xmonad/xmobar.hs | mit | 2,230 | 0 | 9 | 1,093 | 337 | 208 | 129 | -1 | -1 |
module Rebase.Data.Functor.Sum
(
module Data.Functor.Sum
)
where
import Data.Functor.Sum
| nikita-volkov/rebase | library/Rebase/Data/Functor/Sum.hs | mit | 92 | 0 | 5 | 12 | 23 | 16 | 7 | 4 | 0 |
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeFamilies #-}
module App.State
( ServerState(..)
, HasConnections
, GameState
, IsConnection(..)
, defaultInitialState
, defaultInitialStateWithRandomPositions
) where
import App.ConnectionMgnt
import ClassyPrelude
import ... | Haskell-Praxis/core-catcher | src/App/State.hs | mit | 1,560 | 0 | 11 | 413 | 286 | 164 | 122 | 39 | 1 |
{-|
Module : TrackParameter
Description : Short description
Copyright : (c) Laurent Bulteau, Romeo Rizzi, Stéphane Vialette, 2016-1017
License : MIT
Maintainer : vialette@gmail.com
Stability : experimental
Here is a longer description of this module, containing some
commentary with @some markup@.
-}
{-#... | vialette/ppattern-tmp | src/TrackParameter.hs | mit | 1,823 | 3 | 12 | 527 | 459 | 237 | 222 | 32 | 1 |
{-# LANGUAGE DeriveGeneric #-}
module Kantour.KcData.Map.Image where
import Data.Aeson
import GHC.Generics
import qualified Data.HashMap.Strict as HM
import Kantour.KcData.Map.Sprite
import qualified Data.Text as T
data Image = Image
{ frames :: HM.HashMap T.Text Sprite
, meta :: Maybe Value
} deriving (Generic... | Javran/tuppence | src/Kantour/KcData/Map/Image.hs | mit | 347 | 0 | 10 | 53 | 90 | 56 | 34 | 12 | 0 |
pertenece :: a -> ArbolG a -> Bool
pertenece a AVG = False
pertenece a (AG r s) = if ( a == r) then true else (aux a s)
aux :: (Eq a) => a -> [ArbolG a] -> Bool
aux a [] = False;
aux a (h:t) if pertenece a h then True else aux a t
| josegury/HaskellFuntions | Arboles/HojaPerteneceArbol.hs | mit | 234 | 0 | 9 | 62 | 144 | 74 | 70 | -1 | -1 |
module Language.MSH.BuiltIn where
newClassName :: String
newClassName = "New"
newArgsTypeName :: String
newArgsTypeName = "Args"
newKwdName :: String
newKwdName = "new" | mbg/monadic-state-hierarchies | Language/MSH/BuiltIn.hs | mit | 173 | 0 | 4 | 25 | 37 | 23 | 14 | 7 | 1 |
module TypeKwonDo where
chk :: Eq b => (a -> b) -> a -> b -> Bool
chk aToB a b = aToB a == b
arith :: Num b => (a -> b) -> Integer -> a -> b
arith aToB int a = aToB a + fromInteger int
| rasheedja/HaskellFromFirstPrinciples | Chapter6/typeKwonDo.hs | mit | 187 | 0 | 8 | 52 | 107 | 54 | 53 | 5 | 1 |
module Utils where
trim :: [Char] -> [Char]
trim = reverse . removeTrailing ' ' . reverse . removeTrailing ' '
where
removeTrailing :: Char -> [Char] -> [Char]
removeTrailing _ [] = []
removeTrailing a (c:cs)
| (a == c) = removeTrailing a cs
| otherwise = (c:cs)
listOf :: Char -> Int -> [Char]
listOf _ 0 = [... | Qinusty/NoteUp | src/Utils.hs | gpl-2.0 | 355 | 0 | 11 | 82 | 182 | 95 | 87 | 11 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}
module Nirum.Parser ( Parser
, ParseError
, aliasTypeDeclaration
, annotation
, annotationSet
, docs
, enumTypeDeclara... | spoqa/nirum | src/Nirum/Parser.hs | gpl-3.0 | 25,667 | 0 | 25 | 8,317 | 6,295 | 3,042 | 3,253 | 659 | 4 |
module Main where
import System.Environment (getArgs)
import Data.List (sort, permutations)
followingInteger :: Int -> Int
followingInteger n =
head $ sort $ filter (> n) $ map read $ permutations $ ("0" ++ show n)
processLine :: String -> String
processLine = show . followingInteger . read
main :: IO ()
main =... | cryptica/CodeEval | Challenges/44_FollowingInteger/main.hs | gpl-3.0 | 435 | 0 | 10 | 90 | 161 | 83 | 78 | 13 | 1 |
module Sound.Tidal.MIDI.Kindohm.CustomParams where
import Sound.Tidal.Params
-- volca keys
(kportamento, kportamento_p) = pF "kportamento" (Just 0)
(kcutoff, kcutoff_p) = pF "kcutoff" (Just 0)
(klfopitchint, klfopitchint_p) = pF "klfopitchint" (Just 0)
(klforate, klforate_p) = pF "klforate" (Just 0)
(klfocutoffint, k... | kindohm/tidal-midi-rack | Sound/Tidal/MIDI/Kindohm/CustomParams.hs | gpl-3.0 | 2,888 | 0 | 7 | 472 | 1,492 | 784 | 708 | 66 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-drive/gen/Network/Google/Resource/Drive/Teamdrives/Delete.hs | mpl-2.0 | 2,688 | 0 | 12 | 592 | 303 | 186 | 117 | 49 | 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/NetworkEndpointGroups/TestIAMPermissions.hs | mpl-2.0 | 5,061 | 0 | 18 | 1,159 | 550 | 326 | 224 | 98 | 1 |
{-
Created : 2014 Feb by Harold Carr.
Last Modified : 2014 Jul 06 (Sun) 00:45:08 by Harold Carr.
-}
{-# LANGUAGE BangPatterns #-}
module C05 where
import Control.DeepSeq
import Data.List (find)
import qualified Test.HUnit as T
import qualified Test.HUnit.Util a... | haroldcarr/learn-haskell-coq-ml-etc | haskell/book/2014-Alejandro_Serrano_Mena-Beginning_Haskell/old/code/src/C05.hs | unlicense | 5,883 | 0 | 15 | 1,447 | 1,662 | 943 | 719 | 93 | 2 |
module CostasLikeArrays.A320574 where
import Helpers.CostasLikeArrays (distinctDistances, countPermutationsUpToDihedralSymmetry)
import Helpers.Records (allMax)
import Data.List (permutations)
a320574 :: Int -> Int
a320574 n = countPermutationsUpToDihedralSymmetry n $ allMax distinctDistances $ permutations [0..n-1]
| peterokagey/haskellOEIS | src/CostasLikeArrays/A320574.hs | apache-2.0 | 319 | 0 | 8 | 30 | 82 | 45 | 37 | 6 | 1 |
module Permutations.A329851Spec (main, spec) where
import Test.Hspec
import Permutations.A329851 (a329851)
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "A329851" $
it "correctly computes the first six elements" $
map a329851 [0..5] `shouldBe` expectedValue where
expectedValue = [0, 2, 12, ... | peterokagey/haskellOEIS | test/Permutations/A329851Spec.hs | apache-2.0 | 338 | 0 | 8 | 62 | 112 | 64 | 48 | 10 | 1 |
{-# LANGUAGE OverloadedStrings, CPP #-}
module FormStructure.Countries where
#ifndef __HASTE__
import Data.Text.Lazy (Text)
#else
type Text = String
#endif
countries :: [(Text, Text)]
countries =
[ ("", "--select--")
, ("AF", "Afghanistan")
, ("AX", "Åland Islands")
, ("AL", "Albania")
, ("DZ", "... | DataStewardshipPortal/ds-elixir-cz | FormStructure/Countries.hs | apache-2.0 | 6,814 | 0 | 6 | 1,455 | 2,290 | 1,527 | 763 | 255 | 1 |
import SMHI
import Haste
import Haste.Graphics.Canvas
main :: IO ()
main =
do
writeLog "Starting"
-- Just canvas <- getCanvasById "canvasMonths"
plotData "Hour"
plotData "Day"
plotData "Months"
return ()
| daherb/smhi-plot | Main.hs | artistic-2.0 | 230 | 0 | 8 | 55 | 61 | 28 | 33 | 11 | 1 |
module HuttonSScript where
import HERMIT.API
script :: Shell ()
script = return ()
| ku-fpg/better-life | examples/HERMIT/HuttonSScript.hs | bsd-2-clause | 85 | 0 | 6 | 15 | 29 | 16 | 13 | 4 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.